Answers for "create a byte array in c#"

C#
2

c# store byte array as string

public static void Main()
    {
        byte[] bytes = Encoding.Default.GetBytes("ABC123");
        Console.WriteLine("Byte Array is: " + String.Join(" ", bytes));
 
        string str = Encoding.Default.GetString(bytes);
        Console.WriteLine("The String is: " + str);
    }
Posted by: Guest on January-12-2021
8

string from byte array c#

var str = System.Text.Encoding.Default.GetString(result);
Posted by: Guest on August-19-2020

C# Answers by Framework

Browse Popular Code Answers by Language