KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I tried to use the List.ConvertAll method and failed. What I am trying to do is convert a List<Int32> to byte[] I copped out and went this route, but I need to figure out the ConvertAll method... List<Int32> integers... internal byte[] GetBytes() { List<byte> bytes = new List<byte>(integers.Count * sizeof(byte)); foreach (Int32 integer in integers) bytes.AddRange(BitConverter.GetBytes(integer)); return bytes.ToArray(); }
Tags (comma-separated)
Save Edits
Cancel