Hi all,

how can i get the unique error code that is associated with each
Exception.

there is one Property of Exception class named HResult. but that is
protected so i can not access it.

How can i do that. if anybody is having any idea than please do inform

Thanks
Vikash

Re: Getting the Error Code from the Exception Object by John

John
Fri Dec 03 08:51:32 CST 2004

"Vikash Kumar Mitruka" <vikash@nagarro.com> wrote in message
news:327fa0f3.0412030242.2c990353@posting.google.com...
> Hi all,
>
> how can i get the unique error code that is associated with each
> Exception.
>
> there is one Property of Exception class named HResult. but that is
> protected so i can not access it.
>
> How can i do that. if anybody is having any idea than please do inform
>
> Thanks
> Vikash

Vikash, not all exceptions have a unique error code associated with them.
HResult is not useful in the general case.

John Saunders