허당 레몬도리
[C#] List<T>에서 Byte[]로 변경
가. 언어유형/C# 2019. 7. 17. 10:32

출처 : https://stackoverflow.com/questions/34884854/convert-listint-to-byte Convert list to byte[] How to convert list to byte[]? I could use this: byte[] bytes = lista.SelectMany(BitConverter.GetBytes).ToArray(); But it works only for list. If you have few ideas - m... stackoverflow.com List -> byte[] byte[] bytes = lista .SelectMany(x => x) .SelectMany(BitConverter.GetBytes) .ToArray(); byte[] -..