FieldAccessException

FieldAccessException ECMA 1.0, serializable

System (mscorlib.dll) class

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  : MemberAccessException {  // Public Constructors  public  FieldAccessException  ( );    public  FieldAccessException  (string   message   );    public  FieldAccessException  (string   message   , Exception   inner   );  // Protected Constructors  protected  FieldAccessException  (System.Runtime.Serialization.SerializationInfo   info   ,          System.Runtime.Serialization.StreamingContext   context   ); } 

Hierarchy

Object Exception(System.Runtime.Serialization.ISerializable) SystemException MemberAccessException FieldAccessException



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net