using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
namespace AbundantCode
{
internal class Program
{
//How to Convert Byte Array to String in C# ?
private static void Main(string[] args)
{
string Input = "Welcome to Abundantcode.com";
Byte[] ByteOutput = ConvertStringToByte(Input);
string StringOutput = ConvertByteArrayToString(ByteOutput);
Console.WriteLine(StringOutput);
Console.ReadLine();
}
private static string ConvertByteArrayToString(Byte[] ByteOutput)
{
string StringOutput = System.Text.Encoding.UTF8.GetString(ByteOutput);
return StringOutput;
}
public static byte[] ConvertStringToByte(string Input)
{
return System.Text.Encoding.UTF8.GetBytes(Input);
}
}
}