In addition to ToInt32() and all other parsing things. System.Convert should have generic parser
``` C#
public static bool TryParse
{
return T.TryParse(s,out v);
}
public static T ChangeType
{
T v;
ChangeType
return v;
}
public static bool ChangeType
{
try
{
/// Should be better algorithm instead of try/catch + unboxing
v = (T)Convert.ChangeType(obj,typeof(T));
return true;
}
catch
{
v = default(T);
return false;
}
}
/// usage
int i;
if(Convert.TryParse("123456",out i))
DoSomething(i);
double d;
if(Convert.ChangeType(i,out d))
DoSomething(d);
```
This repository is for the language compiler rather than framework libraries.
Can you please suggest this on corefx?
Most helpful comment
This repository is for the language compiler rather than framework libraries.
https://github.com/dotnet/corefx
https://github.com/dotnet/coreclr