Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ReadOnlyAttribute.cs / 1305376 / ReadOnlyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class ReadOnlyAttribute : Attribute { private bool isReadOnly = false; ///Specifies whether the property this attribute is bound to /// is read-only or read/write. ////// public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); ////// Specifies that the property this attribute is bound to is read-only and /// cannot be modified in the server explorer. This ///field is /// read-only. /// /// public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false); ////// Specifies that the property this attribute is bound to is read/write and can /// be modified at design time. This ///field is read-only. /// /// public static readonly ReadOnlyAttribute Default = No; ////// Specifies the default value for the ///, which is , that is, /// the property this attribute is bound to is read/write. This field is read-only. /// /// public ReadOnlyAttribute(bool isReadOnly) { this.isReadOnly = isReadOnly; } ////// Initializes a new instance of the ///class. /// /// public bool IsReadOnly { get { return isReadOnly; } } ////// Gets a value indicating whether the property this attribute is bound to is /// read-only. /// ////// /// public override bool Equals(object value) { if (this == value) { return true; } ReadOnlyAttribute other = value as ReadOnlyAttribute; return other != null && other.IsReadOnly == IsReadOnly; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// public override bool IsDefaultAttribute() { return (this.IsReadOnly == Default.IsReadOnly); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Determines if this attribute is the default. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClockGroup.cs
- PreviewPageInfo.cs
- MediaPlayer.cs
- HtmlTableRow.cs
- ToolStripSettings.cs
- SafeLibraryHandle.cs
- LineSegment.cs
- InstanceStoreQueryResult.cs
- SecurityTokenAuthenticator.cs
- ExtensionFile.cs
- Wizard.cs
- ObjectSecurity.cs
- FontDialog.cs
- NullableBoolConverter.cs
- XmlWhitespace.cs
- EndpointDiscoveryElement.cs
- ContextQuery.cs
- LayoutEngine.cs
- RealizationContext.cs
- OuterGlowBitmapEffect.cs
- PersonalizationProvider.cs
- TextFormatter.cs
- RequestTimeoutManager.cs
- FileUtil.cs
- ExpressionPrefixAttribute.cs
- ProfileGroupSettingsCollection.cs
- XmlLinkedNode.cs
- MethodCallConverter.cs
- DataObjectMethodAttribute.cs
- PrinterSettings.cs
- SqlVisitor.cs
- WeakKeyDictionary.cs
- StylusPointPropertyInfo.cs
- OpCodes.cs
- XmlImplementation.cs
- QilTernary.cs
- GridViewCancelEditEventArgs.cs
- XamlClipboardData.cs
- InputLanguageCollection.cs
- TemplateLookupAction.cs
- ImageBrush.cs
- XmlElement.cs
- OutputCacheProfile.cs
- TogglePattern.cs
- IntMinMaxAggregationOperator.cs
- SafeLibraryHandle.cs
- SqlComparer.cs
- SortedDictionary.cs
- ListViewDeletedEventArgs.cs
- Base64Stream.cs
- ConfigurationFileMap.cs
- InvalidDataException.cs
- Activator.cs
- TreeViewImageGenerator.cs
- ExpandSegmentCollection.cs
- HMAC.cs
- OdbcUtils.cs
- FormViewCommandEventArgs.cs
- Odbc32.cs
- ScriptControlManager.cs
- filewebresponse.cs
- DataGridBoolColumn.cs
- HtmlControl.cs
- SystemInfo.cs
- VectorCollectionConverter.cs
- WindowsGraphics.cs
- XamlValidatingReader.cs
- Rule.cs
- MenuItemCollection.cs
- ComplexLine.cs
- MethodBuilder.cs
- ToggleButton.cs
- SqlCacheDependencyDatabaseCollection.cs
- FeatureManager.cs
- GraphicsContext.cs
- SHA512Managed.cs
- CssStyleCollection.cs
- EnumUnknown.cs
- EventBuilder.cs
- AdornerHitTestResult.cs
- PropertyEmitterBase.cs
- IteratorFilter.cs
- SqlBuffer.cs
- RequestCacheManager.cs
- ComboBoxItem.cs
- RealProxy.cs
- InputBinder.cs
- Section.cs
- Multiply.cs
- _OverlappedAsyncResult.cs
- Point3DConverter.cs
- XPathScanner.cs
- HtmlTable.cs
- Int32Rect.cs
- BitmapSource.cs
- Conditional.cs
- TableDesigner.cs
- GacUtil.cs
- CharUnicodeInfo.cs
- MultiBindingExpression.cs