views:

154

answers:

3

I have an error in my website and trying to resolve: Error "format exception was unhandled" such that it work for both date time as well as with string and integer.

Please see the details and code from this link http://tinyurl.com/ydg3u7s

Thanks

+1  A: 
return Convert.ChangeType(IsThisObjectANull, DataTypeCode);

The conversion is probably failing due to incompatible types . You might have to debug and check when this happens .

NM
A: 

Could you post the arguments you pass to the your method? Without knowing what you actually pass in we can just guess.

helium
YA GIVE ME A MIN
Shantanu Gupta
A: 

Perhaps some try/catch mechanism?

Stefan Hendriks