Hi All,
I am writing an simple code like this one
try
{
string abc = "new";
}
catch(Exception ex)
{
if(errorcode == ex.??)
do this;
else
do this;
}
My Question is that i need to fetch the error code using Exception ex so that based on the error code i can display the genric message for the exception. In some articles i have read that we can do this with the help HResult property.
Could any one tell me with a code that how to fetch error code?
Thanks
Nikhil Gupta