I know I can extend the string class like so:
public static class EMClass
{
public static int ToInt32Ext(this string s)
{
return Int32.Parse(s);
}
public static int ToInt32Static(string s)
{
return Int32.Parse(s);
}
}
And use it like this:
string x = "12";
x.ToInt32Ext()
But how can I make it to where I can use it like this:
int x = string.ToInt32("15");