What is the best way for converting string (decimal number) into integer in C#?
In my case, message is a string with coordinates that are separated with {x:y}
This is not working for me (don't know why):
string[] coordinates = Regex.Split(message, "{x:y}");
int coord_X = (int) float.Parse(coordinates[0]);
int coord_Y = (int) float.Parse(coordinates[1]);
Message is equal to: -5.5707855{x:y}0.8193512{x:y}
coord_X is -55707855 (should be -5.5707855)
coord_Y is 8193512 (should be 0.8193512)
10.000.000and don't cast them toint?