ReadOnlyAttribute

ReadOnlyAttribute

System.ComponentModel (system.dll) sealed class

If you mark a property with this attribute, you can indicate whether it is read-only or read- write in the designer. Compare this with the DesignOnlyAttribute .

You can use the IsReadOnly property to determine the state of the attribute, but an instance of the attribute can also be compared against the Yes and No values for equality.

 public sealed class  ReadOnlyAttribute  : Attribute {  // Public Constructors  public  ReadOnlyAttribute  (bool  isReadOnly  );  // Public Static Fields  public static readonly ReadOnlyAttribute  Default  ;  // =System.ComponentModel.ReadOnlyAttribute  public static readonly ReadOnlyAttribute  No  ;  // =System.ComponentModel.ReadOnlyAttribute  public static readonly ReadOnlyAttribute  Yes  ;  // =System.ComponentModel.ReadOnlyAttribute   // Public Instance Properties  public bool  IsReadOnly  {get; }  // Public Instance Methods  public override bool  Equals  (object  value  );  // overrides Attribute  public override int  GetHashCode  ();  // overrides Attribute  public override bool  IsDefaultAttribute  ();  // overrides Attribute  } 

Hierarchy

System.Object System.Attribute ReadOnlyAttribute

Valid On

All



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

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