Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing exception class
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Subclassing exception class
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01571640
Message ID:
01571640
Vues:
50
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
Répondre
Fil
Voir

Click here to load this message in the networking platform