Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing exception class
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Subclassing exception class
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01571640
Message ID:
01571640
Views:
48
Hi everybody,

I get ex.HResult underlined and this error

Error 4 The property or indexer 'System.Exception.HResult' cannot be used in this context because the get accessor is inaccessible

I don't understand this error. According to documentation I checked
http://msdn.microsoft.com/en-us/library/system.exception.hresult.aspx

this property has public get. So, why do we get this error?

Thanks in advance.

I re-checked documentation and our version of framework. We're using 4.0 framework and HResult is not accessible in that version (it is protected).
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform