Converting List to byte[] in C#.

public byte[] GetBytesFromList()
{
List lstByte= new List(90);
byte[] byteArr = Encoding.ASCII.GetBytes("Test");
lstByte.AddRange(byteArr);
return lstByte.ToArray();
}

...S.VinothkumaR.

1 comment:

Unknown said...

Hi Vinoth,

Thanks for your help.

Carlos