hex
-
[WPF] hexColor to (Color or SolidColorBrush)Microsoft .NET/WPF 2021. 11. 24. 10:46
// Color Color color_1 = (Color)new BrushConverter().ConvertFrom("#CA5100"); //SolidColorBrush SolidColorBrush brush_1 = (SolidColorBrush)new BrushConverter().ConvertFrom("#CA5100"); //xamarin Xamarin.Essentials.ColorConverters.FromHex("#CA5100")
-
[C#] 16진수(hex) 문자열<-> Byte[] 변환Microsoft .NET/C# 2020. 1. 3. 20:02
1. 16진수 문자열 -> Byte[] /// /// 16진수 문자를 16진수 Byte[]로 변환 /// /// /// /// public byte[] HexStringToByteHex(string strHex) { if (strHex.Length % 2 != 0) MessageBox.Show("HexString는 홀수일 수 없습니다. - " + strHex); byte[] bytes = new byte[strHex.Length / 2]; for (int count = 0; count < strHex.Length; count += 2) { bytes[count / 2] = System.Convert.ToByte(strHex.Substring(count, 2), 16); } return bytes; } 2..