1. 온라인(Online)으로 Hex 값을 Int(Decimal)로 변경하기
https://www.rapidtables.com/convert/number/hex-to-decimal.html
위 사이트가 정말 편한것 같습니다. 자주 쓰게 되네요.
2. C# 코드로 Hex 값을 Int로, 그리고 반대로 변경하기
ToString()에서 X 키워드를 넣으면 Hex값으로 변환이 되죠.
그 반대로 Hex문자열을 int로 변환하려면 위와 같은 작업을 해줘야 하는군요..
혹시 기억 안나실땐 이 코드를 쓰시면 됩니다!
// Store integer 182
int decValue = 182;
// Convert integer 182 as a hex in a string variable
string hexValue = decValue.ToString("X");
// Convert the hex string back to the number
int decAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
'Development > .NET' 카테고리의 다른 글
| Visual Studio 2008 and .NET Framework 3.5 Training Kit (0) | 2007.12.19 |
|---|---|
| C# XML Document 생성 애드인(Add-in) (1) | 2007.12.19 |
| WPF 3D 온라인 강좌 (0) | 2007.12.04 |
| .NET 통합 언어 쿼리 LINQ (0) | 2007.11.26 |
| COM+ : Recovery thread failed to start 에러 해결방법 (0) | 2007.11.12 |