Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert byte array to list<byte> using Silverlight and C#

How do I convert a byte[] array to a list<byte>?

I am using the Silverlight framework only.

like image 384
Bart Teunissen Avatar asked Dec 09 '22 01:12

Bart Teunissen


1 Answers

Simply:

List<byte> myBytes = new List<Byte>(byteArray);

Or using LINQ extensions:

List<byte> myBytes = byteArray.ToList();
like image 158
Adam Houldsworth Avatar answered Dec 22 '22 01:12

Adam Houldsworth