Kevin Driedger
2009-08-27 18:29:54
A:
+2
A:
You need to add a format specifier:
Console.WriteLine("{0:x}", i);
MiffTheFox
2009-08-27 18:30:09
+5
A:
Console.WriteLine ("Hex: {0:X}", nNum);
The X formatter outputs uppercase hex chars. Use a lowercase x for lowercase hex chars.
jscharf
2009-08-27 18:30:35
+2
A:
Sometimes you wonder if people know google exists as that gives you an answer right away.
Try Google.search( "C# integer hex" ); and click the first link.
Janco
2009-08-27 18:36:01
+1 Google should start giving rep :P
SwDevMan81
2009-08-27 18:41:45
You nail the problem on the head :D
Janco
2009-08-27 18:50:56
-1, SO's mission is to be the top hit on Google for queries just like that. See: http://meta.stackoverflow.com/questions/16923/close-option-for-too-lazy-to-search-the-web
John Rudy
2009-08-27 18:51:18
@John Rudy - Indeed. I specifically asked this question due to the comments made by Jeff and Joel on the StackOverflow Podcast.
Kevin Driedger
2009-08-29 03:39:33