Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FieldAccessException Class

The exception that is thrown when there is an invalid attempt to access a private or protected field inside a class.

For a list of all members of this type, see FieldAccessException Members.

System.Object
   System.Exception
      System.SystemException
         System.MemberAccessException
            System.FieldAccessException

[Visual Basic]
<Serializable>
Public Class FieldAccessException
   Inherits MemberAccessException
[C#]
[Serializable]
public class FieldAccessException : MemberAccessException
[C++]
[Serializable]
public __gc class FieldAccessException : public
   MemberAccessException
[JScript]
public
   Serializable
class FieldAccessException extends MemberAccessException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

This exception is typically thrown when the access level of a field in a class library is changed, and one or more assemblies referencing the library have not been recompiled.

FieldAccessException uses the HRESULT COR_E_FIELDACCESS, which has the value 0x80131507.

For a list of initial property values for an instance of FieldAccessException, see the FieldAccessException constructors.

Requirements

Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

FieldAccessException Members | System Namespace | Exception | Handling and Throwing Exceptions

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft