반응형
- // string hax를 byte array로 변환
- private static byte[] StringToByteArray(string hex)
- {
- return Enumerable.Range(0, hex.Length)
- .Where(x => x % 2 == 0)
- .Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
- .ToArray();
- }
반응형
'Programming > C#' 카테고리의 다른 글
c# print byte array (0) | 2013.10.04 |
---|---|
C# byte array to Array.ConvertAll: (0) | 2013.10.03 |
C# Save byte[] into a SQL Server database (0) | 2013.09.26 |
C# SqlDataReade (0) | 2013.09.25 |
C# write text file (0) | 2013.09.25 |