Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void conversion(string value)
- {
- Console.WriteLine("{0} to decimal is {1}.",
- value, Convert.ToInt32(value, 16));
- Console.WriteLine("{0} to decimal is {1}.\n", value,
- Convert.ToString(Convert.ToInt32(value, 16), 2));
- }
- static void Main(string[] args)
- {
- conversion("2A3E");
- conversion("FA");
- conversion("FFFF");
- conversion("5A0E9");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement