Name
FieldAccessException
Synopsis
This exception is thrown when you try to access a protected or
private field that you would not normally have access to.
Most compilers will not let you compile code that does this
directly. However, late-bound code can sneak by the compiler
and throw this exception at runtime. For example, if you
lack sufficient privileges to modify a field using System.Reflection.FieldInfo.SetValue()
, this
exception is thrown.
Public Class FieldAccessException : Inherits MemberAccessException ' Public Constructors Public Sub New() Public Sub New( ByVal message As String) Public Sub New(ByVal message As String, ByVal inner As Exception) ' Protected Constructors Protected Sub New( ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) End Class
Hierarchy
Object→Exception(System.Runtime.Serialization.ISerializable)→SystemException→MemberAccessException→ FieldAccessException
Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.