Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Compile and Execute C# Sharp Online

using System;
using System.IO;

class Program
    {
        static void Main()
        {
            UdkFileReader reader = new UdkFileReader(@"C:\Users\Mukundn2\Downloads\UdkCITest.txt");
            MemoryStream stream = new MemoryStream();
            reader.CopyStream(stream);

            StreamReader sReader = new StreamReader(stream);
            Console.WriteLine("Line Copied" + sReader.ReadLine());

        }


    }

    class UdkFileReader
    {
        public UdkFileReader(String fileName)
        {
            OpenFile(fileName);
        }

        private StreamReader fileStream;

        private String _line;

        /// <summary>
        /// Current Line
        /// </summary>
        public String Line
        {
            get { return _line; }
        }

        /// <summary>
        /// Open File
        /// </summary>
        /// <param name="fileName">fileName</param>
        private void OpenFile(String fileName)
        {
            fileStream = new StreamReader(fileName);

            NextLine();
        }

        public void NextLine()
        {
            if (fileStream != null)
                _line = fileStream.ReadLine();
        }

        public MemoryStream CopyStream(MemoryStream target)
        {
            if (fileStream != null)
                fileStream.BaseStream.CopyToAsync(target);

            return target;
        }
    }

Compile and Execute C# Sharp Online

03-Tue-Oct-2017
-Investigate xml file download error with cause: call mix content url
-Create method getInquiry in class PaymentManagement.java
-Create method findPmInqByPmiId in class PmInquiryDao.java
-Modify method getLabelsFromModuleFile in class EtaxRestfulController.java

05-Thu-Oct-2017
-Modify method getInquiry return with single inquiry instead list
-Investigate when showing the error information of Bulk Transaction.

10-Tue-Oct-2017
-Investigate some error when run BlukCheckRunner.jar, Cause log4j are incompatible version. 

17-Tue-Oct-2017
-Apply and proved when jsgrid render with resizable column use the library [colResizable]
-Change library use common-text instead common-lang for prevent deprecate class. 

19-Tue-Oct-2017
-Fixed in case M-Plus show data incorrect.
-Check browser support with "Firefox(22)" and "IE(8)".  
-Make javascript file to min version.

24-Tue-Oct-2017
-Fiexd response character incorrect on bundle properties in TH, JP 
-Try to configuration "Site Down For Maintenance" on IBM HTTP Server.
-Help to fixed splitter parameter list from Client post.

hello

using System.IO;
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("Hello, World!");
    }
}

Compile and Execute C# Sharp Online

using System.IO;
using System;
using System.Security.Cryptography;
class Program
{
    
    private static string DecryptStringFromBytes(byte[] cipherText, byte[] key, byte[] iv)
        {
            
            // Check arguments.
            if (cipherText == null || cipherText.Length <= 0)
            {
                throw new ArgumentNullException("cipherText");
            }
            if (key == null || key.Length <= 0)
            {
                throw new ArgumentNullException("key");
            }
            if (iv == null || iv.Length <= 0)
            {
                throw new ArgumentNullException("key");
            }

            // Declare the string used to hold
            // the decrypted text.
            string plaintext = null;

            // Create an RijndaelManaged object
            // with the specified key and IV.
            using (var rijAlg = new RijndaelManaged())
            {
                //Settings
                rijAlg.Mode = CipherMode.CBC;
                rijAlg.Padding = PaddingMode.Zeros;        //PKCS7;
                rijAlg.FeedbackSize = 128;

                rijAlg.Key = key;
                rijAlg.IV = iv;
              
                // Create a decrytor to perform the stream transform.
                var decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);

                // Create the streams used for decryption.
                using (var msDecrypt = new MemoryStream(cipherText))
                {
                    using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
                    {
                        using (var srDecrypt = new StreamReader(csDecrypt))
                        {
                            // Read the decrypted bytes from the decrypting stream
                            // and place them in a string.
                            plaintext = srDecrypt.ReadToEnd();
                        }
                    }
                }
            }

            return plaintext;
        }static void Main()
    {
        
        byte[] mykey = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C };
        byte[] myiv = { 0x38, 0x36, 0x36, 0x37, 0x37, 0x31, 0x30, 0x32, 0x31, 0x31, 0x37, 0x33, 0x38, 0x34, 0x33, 0x30 };
        byte[] encrypted = {
	    0x30, 0x4C, 0x97, 0xD0, 0xFD, 0xE7, 0xD8, 0xD4, 0x0C, 0x45, 0xED, 0x88, 0x96, 0x4A, 0x12, 0x1F,
    	0x51, 0xCC, 0x04, 0x2C, 0xE1, 0xAE, 0x96, 0x0F, 0x8E, 0x6E, 0xD3, 0x1E, 0x2C, 0xA2, 0xFA, 0xF7,
	    0xA8, 0x96, 0x50, 0xF9, 0x65, 0x9D, 0x42, 0x88, 0x98, 0xC6, 0xFF, 0xEE, 0xA3, 0x84, 0x55, 0x64,
	    0x9B, 0xD0, 0xFD, 0x10, 0xBE, 0x44, 0x5F, 0xE8, 0x45, 0x45, 0xB3, 0x29, 0xAD, 0x39, 0x57, 0x18,
	    0x4E, 0x67, 0x76, 0x03, 0x02, 0x1C, 0x7D, 0xC7, 0xC8, 0xBE, 0x9B, 0x01, 0x0B, 0xB5, 0x08, 0xCC };
	    
        String plaintext = DecryptStringFromBytes(encrypted, mykey, myiv);
        Console.WriteLine(plaintext);
    }
}

Compile and Execute C# Sharp Online

using System.IO;
using System;
using System.Security.Cryptography;
class Program
{
    
    private static string DecryptStringFromBytes()      //(byte[] cipherText, byte[] key, byte[] iv)
        {
            byte[] key = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C };
            byte[] iv = { 0x38, 0x36, 0x36, 0x37, 0x37, 0x31, 0x30, 0x32, 0x31, 0x31, 0x37, 0x33, 0x38, 0x34, 0x33, 0x30 };
            byte[] cipherText = {
	        0x30, 0x4C, 0x97, 0xD0, 0xFD, 0xE7, 0xD8, 0xD4, 0x0C, 0x45, 0xED, 0x88, 0x96, 0x4A, 0x12, 0x1F,
    	    0x51, 0xCC, 0x04, 0x2C, 0xE1, 0xAE, 0x96, 0x0F, 0x8E, 0x6E, 0xD3, 0x1E, 0x2C, 0xA2, 0xFA, 0xF7,
	        0xA8, 0x96, 0x50, 0xF9, 0x65, 0x9D, 0x42, 0x88, 0x98, 0xC6, 0xFF, 0xEE, 0xA3, 0x84, 0x55, 0x64,
	        0x9B, 0xD0, 0xFD, 0x10, 0xBE, 0x44, 0x5F, 0xE8, 0x45, 0x45, 0xB3, 0x29, 0xAD, 0x39, 0x57, 0x18,
	        0x4E, 0x67, 0x76, 0x03, 0x02, 0x1C, 0x7D, 0xC7, 0xC8, 0xBE, 0x9B, 0x01, 0x0B, 0xB5, 0x08, 0xCC };
            // Check arguments.
            if (cipherText == null || cipherText.Length <= 0)
            {
                throw new ArgumentNullException("cipherText");
            }
            if (key == null || key.Length <= 0)
            {
                throw new ArgumentNullException("key");
            }
            if (iv == null || iv.Length <= 0)
            {
                throw new ArgumentNullException("key");
            }

            // Declare the string used to hold
            // the decrypted text.
            string plaintext = null;

            // Create an RijndaelManaged object
            // with the specified key and IV.
            using (var rijAlg = new RijndaelManaged())
            {
                //Settings
                rijAlg.Mode = CipherMode.CBC;
                rijAlg.Padding = PaddingMode.Zeros;        //PKCS7;
                rijAlg.FeedbackSize = 128;

                rijAlg.Key = key;
                rijAlg.IV = iv;
              
                // Create a decrytor to perform the stream transform.
                var decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);

                // Create the streams used for decryption.
                using (var msDecrypt = new MemoryStream(cipherText))
                {
                    using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
                    {
                        using (var srDecrypt = new StreamReader(csDecrypt))
                        {
                            // Read the decrypted bytes from the decrypting stream
                            // and place them in a string.
                            plaintext = srDecrypt.ReadToEnd();
                        }
                    }
                }
            }

            return plaintext;
        }static void Main()
    {
        /*
        byte[] key = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C };
        byte[] iv = { 0x38, 0x36, 0x36, 0x37, 0x37, 0x31, 0x30, 0x32, 0x31, 0x31, 0x37, 0x33, 0x38, 0x34, 0x33, 0x30 };
        byte[] encrypted = {
	    0x30, 0x4C, 0x97, 0xD0, 0xFD, 0xE7, 0xD8, 0xD4, 0x0C, 0x45, 0xED, 0x88, 0x96, 0x4A, 0x12, 0x1F,
    	0x51, 0xCC, 0x04, 0x2C, 0xE1, 0xAE, 0x96, 0x0F, 0x8E, 0x6E, 0xD3, 0x1E, 0x2C, 0xA2, 0xFA, 0xF7,
	    0xA8, 0x96, 0x50, 0xF9, 0x65, 0x9D, 0x42, 0x88, 0x98, 0xC6, 0xFF, 0xEE, 0xA3, 0x84, 0x55, 0x64,
	    0x9B, 0xD0, 0xFD, 0x10, 0xBE, 0x44, 0x5F, 0xE8, 0x45, 0x45, 0xB3, 0x29, 0xAD, 0x39, 0x57, 0x18,
	    0x4E, 0x67, 0x76, 0x03, 0x02, 0x1C, 0x7D, 0xC7, 0xC8, 0xBE, 0x9B, 0x01, 0x0B, 0xB5, 0x08, 0xCC };
	    */
        String plaintext = DecryptStringFromBytes();      //(byte[] encrypted, byte[] key, byte[] iv);
        Console.WriteLine(plaintext);
    }
}

vbxcvbxcvb

using System.IO;
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("Hello, World!");
    }
}

Compile and Execute C# Sharp Online

using System.IO;
using System;

class Program
{
    static void Main()
    {
        int funkcja;
        double a, b;
        Console.WriteLine("Wybierz funkcję:");
        Console.WriteLine("1. Dodawanie");
        Console.WriteLine("2. Odejmowanie");
        Console.WriteLine("3. Mnożenie");
        Console.WriteLine("4. Dzielenie");
        funkcja = Convert.ToInt16(Console.ReadLine());
        
        switch (funkcja) {
            case 1: 
                Console.WriteLine("Podaj pierwszy składnik");
                a = rd();
                Console.WriteLine("Podaj drugi składnik");
                b = rd();
                Console.WriteLine(a+b);
                break;
            case 2:
                Console.WriteLine("Podaj pierwszą liczbę");
                a = rd();
                Console.WriteLine("Podaj drugą liczbę");
                b = rd();
                Console.WriteLine(a-b);
                break;
            case 3:
                Console.WriteLine("Podaj pierwszą liczbę");
                a = rd();
                Console.WriteLine("Podaj drugą liczbę");
                b = rd();
                Console.WriteLine(a*b);
                break;
            case 4:
                Console.WriteLine("Podaj pierwszą liczbę");
                a = rd();
                Console.WriteLine("Podaj drugą liczbę");
                b = rd();
                if (b==0) 
                {
                    Console.WriteLine("Nie można dzielić przez 0!");
                }
                else 
                {
                    Console.WriteLine(a/b);
                }
                break;
        }
    }
    public static double rd () {
        return Convert.ToDouble(Console.ReadLine());
    }
}

Compile and Execute C# Sharp Online

using System.IO;
using System;
using System.Security.Cryptography;
class Program
{
    public String Decrypt(byte [] cipher, byte [] btkey)
    {
    //init AES 128
	RijndaelManaged aes128 = new RijndaelManaged();
	aes128.Mode = CipherMode.CBC;    
    aes128.Padding = PaddingMode.Zeros;
    //decrypt
	ICryptoTransform decryptor = aes128.CreateDecryptor(btkey, null);
	MemoryStream ms = new MemoryStream(cipher);
	CryptoStream cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read);
 
	byte[] plain = new byte[cipher.Length];
	int decryptcount = cs.Read(plain, 0, plain.Length);
 
	ms.Close();
	cs.Close();
    return Encoding.UTF8.GetString(plain, 0, decryptcount);
    }
    //[STAThread]
    public static void Main()
    {
        byte[] key = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C };
        byte[] IVval = { 0x38, 0x36, 0x36, 0x37, 0x37, 0x31, 0x30, 0x32, 0x31, 0x31, 0x37, 0x33, 0x38, 0x34, 0x33, 0x30 };
        byte[] encrypted = {
	    0x30, 0x4C, 0x97, 0xD0, 0xFD, 0xE7, 0xD8, 0xD4, 0x0C, 0x45, 0xED, 0x88, 0x96, 0x4A, 0x12, 0x1F,
    	0x51, 0xCC, 0x04, 0x2C, 0xE1, 0xAE, 0x96, 0x0F, 0x8E, 0x6E, 0xD3, 0x1E, 0x2C, 0xA2, 0xFA, 0xF7,
	    0xA8, 0x96, 0x50, 0xF9, 0x65, 0x9D, 0x42, 0x88, 0x98, 0xC6, 0xFF, 0xEE, 0xA3, 0x84, 0x55, 0x64,
	    0x9B, 0xD0, 0xFD, 0x10, 0xBE, 0x44, 0x5F, 0xE8, 0x45, 0x45, 0xB3, 0x29, 0xAD, 0x39, 0x57, 0x18,
	    0x4E, 0x67, 0x76, 0x03, 0x02, 0x1C, 0x7D, 0xC7, 0xC8, 0xBE, 0x9B, 0x01, 0x0B, 0xB5, 0x08, 0xCC };
        String plaintext = Decrypt(encrypted, key);
        
        Console.WriteLine("plaintext");
    }
    
}
//Ceru ka te saglabajas uzrakstitais.

Compile and Execute C# Sharp Online

using System.IO;
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("1234567890qwertyuiopasdfghjklzxcvbnm");
    }
}

Hello World

using System.IO;
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("Hello, World!");
    }
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.