![]() |
| ||
| decimal to hexadecimal I want the code of program that convert from "decimal to hexadecimal "and from "hexadecimal to decimal " in console applicathion |
| ||
| Re: decimal to hexadecimal there is the code I have but I don't know if it was right or wrong from "decimal to hexadecimal" namespace ConsoleApplication2 |
| ||
| Re: decimal to hexadecimal Off course you can always save you the trouble of doing it yourself and use format specifiers like this: int value = 32767; Console.WriteLine("{0,10:G}: {0,10 : X}", value); Which will output: 32767: 7FFF |
| ||
| Re: decimal to hexadecimal this also does the trick to convert from hex -> number: int.Parse(Hex, System.Globalization.NumberStyles.HexNumber); for bigger value long.Parse(Hex, System.Globalization.NumberStyles.HexNumber); other way round string hex = Value.ToString("x"); |
| All times are GMT -4. The time now is 4:19 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC