Bart Teunissen
Bart Teunissen

Reputation: 1470

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.

Upvotes: 4

Views: 18726

Answers (1)

Adam Houldsworth
Adam Houldsworth

Reputation: 64517

Simply:

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

Or using LINQ extensions:

List<byte> myBytes = byteArray.ToList();

Upvotes: 14

Related Questions