ToInt32
Convert string to int32
Source
public static int ToInt32(this string value)
{
int number;
Int32.TryParse(value, out number);
return number;
}
Example
string number = "1";
int converted = number.ToInt32();
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Convert string to int32
public static int ToInt32(this string value)
{
int number;
Int32.TryParse(value, out number);
return number;
}
string number = "1";
int converted = number.ToInt32();