Quantcast
Channel: TechPint - Error
Viewing all articles
Browse latest Browse all 5

"FormatException was unhandled" Input string was not in a correct format.

$
0
0

Hi ! Here I am trying to write a function that returns me value based on the following condition... IF Variable is NULL return me DBNull.Value ELSE Convert Variable into DataType whose DataTypeCode has been provided to me as a parameter of function. Now while converting a variable into required DataType an exception is thrown "FormatException was unhandled". Input string was not in a correct format. How do I resolve this error please help. Here is my code...

publicobject ReturnDBNullOrRequiredDatatype(object IsThisObjectANull, TypeCode DataTypeCode) 
{

read more


Viewing all articles
Browse latest Browse all 5

Trending Articles