How would I turn a string “101.123” into a int? I try to use int.parse with it, but it’s giving me this error saying that it can’t parse the string.
A couple of possibilities:
var myString = "101.123";
var myInt = parseInt (parseFloat (myString));
Or
var myString = "101.123";
var myInt = parseInt (myString.Substring (0, myString.IndexOf (".")));