File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public static class extensions
1818 /// <returns>hexadecimal string representing the value</returns>
1919 public static string ToHexString ( this byte val )
2020 {
21- return String . Format ( "0x{0:x }" , val ) ;
21+ return String . Format ( "0x{0:X2 }" , val ) ;
2222 }
2323 /// <summary>
2424 /// returns a string containing the value as hexadecimal
@@ -27,7 +27,7 @@ public static string ToHexString(this byte val)
2727 /// <returns>hexadecimal string representing the value</returns>
2828 public static string ToHexString ( this UInt16 val )
2929 {
30- return String . Format ( "0x{0:x }" , val ) ;
30+ return String . Format ( "0x{0:X4 }" , val ) ;
3131 }
3232 /// <summary>
3333 /// returns a string containing the value as hexadecimal
@@ -36,7 +36,7 @@ public static string ToHexString(this UInt16 val)
3636 /// <returns>hexadecimal string representing the value</returns>
3737 public static string ToHexString ( this UInt32 val )
3838 {
39- return String . Format ( "0x{0:x }" , val ) ;
39+ return String . Format ( "0x{0:X8 }" , val ) ;
4040 }
4141
4242 }
You can’t perform that action at this time.
0 commit comments