String Conversions
if string to double start : "3.5" asDouble
comment line : ...
if string to double end
variable : secondIntRaw string "14"
if string to int start : "7" firstInt secondIntRaw secondInt
comment line : ...
if string to int endif (double.TryParse("3.5", out var asDouble))
{
// ...
}
string secondIntRaw = "14";
if (int.TryParse("7", out var firstInt) && int.TryParse(secondIntRaw, out var secondInt))
{
// ...
}Last updated