The exception you are getting is :- System.FormatException
.
Here is a brief description about it:-
FormatException is thrown when the format of an argument in a method invocation does not match the format of the corresponding formal parameter type. For example, if a method specifies a String parameter consisting of two digits with an embedded period, passing a corresponding string argument containing only two digits to that method would cause FormatException to be thrown. FormatException uses the HRESULT COR_E_FORMAT, which has the value 0x80131537.
If you have a WinForm application, try doing it in you "Program.cs" file:-(default name of the file generated by viusual studio)
try
{
Application.Run(new Form()) ;
}
catch(Exception ex)
{
Log(ex) ;
}
void Log(Exception ex)
{
string stackTrace = ex.StackTrace ;
File.WriteAllText(youFilePathHere, stackTrace) ; // path of file where stack trace will be stored.
}
By analyzing the stack-trace it will be easy for you to know a lot about the "Run time exception" you are experiencing in your application.(exact line no, method name etc).
Hope it helps!