Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7190

How to convert a string in uint with a symbol in it in c#

$
0
0

I have the problem that when I want to type in the console eg. 0x12345678 it should convert it to an uint and save it as an uint. But it crashes on me and says that it has the wrong format.

        uint zahl = 0x12345678;        uint zahl2;        Console.Write(zahl);    //Puts out into the Console: 305419896        zahl2 = Convert.ToUInt32(Console.ReadLine());   //I type in the Console 0x12345678 and after I press Enter it crashes        Console.Write(zahl2);        Console.ReadLine();

Viewing all articles
Browse latest Browse all 7190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>