This documentation is archived and is not being maintained.

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.


[Visual Basic]
Public Class FieldAccessException
   Inherits MemberAccessException
public class FieldAccessException : MemberAccessException
public __gc class FieldAccessException : public
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.


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.


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