.NET Convert an integer to hex value

By [)ia6l0 iii

Use the ToString overload to convert an Integer to hex value.

int sampleNum = 19;
String hexValueOfSampleNum = sampleNum.ToString("X");

Related FAQs

Exception.ToString() contains a detailed description of the Exception with its stack trace. The Message property of the Exception object contains the smaller version of the description.
Use the Environment class to get important and user-specific properties like the User Profile folder.
Named and optional parameters is a new concept introduced in 4.0. The Named Parameters allow you to pass arguments by parameter name instead of parameter position in the signature. Optional Parameters allow parameters to be specified as optional by providing a default value for them in a member declaration. When the member is invoked, optional arguments can be omitted.
Use the ColorTransalator to convert a html string or the color name to a valid Color object.
Extension method to get the start of a day
You can truncate the file paths using the Shell LightWeight library.
.NET Convert an integer to hex value  (1009 Views)