Parse a negative integer value.
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
string value;
float number;
value = "-168934617882109132";
if (Single.TryParse(value, out number))
Console.WriteLine(number);
else
Console.WriteLine("Unable to parse '{0}'.", value);
}
}
Related examples in the same category