Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / ReadOnlyAttribute.cs / 1 / 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. /// ///// 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
- BrowserCapabilitiesCodeGenerator.cs
- ZipArchive.cs
- FixedSOMContainer.cs
- objectresult_tresulttype.cs
- Menu.cs
- CodeTypeDeclarationCollection.cs
- FontUnit.cs
- UserMapPath.cs
- WebPartDisplayMode.cs
- DetailsViewDeleteEventArgs.cs
- SqlXmlStorage.cs
- TextModifierScope.cs
- XmlElement.cs
- XamlPointCollectionSerializer.cs
- COM2IProvidePropertyBuilderHandler.cs
- MediaEntryAttribute.cs
- AnnotationDocumentPaginator.cs
- FileUtil.cs
- ContentPlaceHolder.cs
- DbProviderConfigurationHandler.cs
- Byte.cs
- CustomAssemblyResolver.cs
- XmlAttributeAttribute.cs
- ElementMarkupObject.cs
- HierarchicalDataTemplate.cs
- MachineKeyConverter.cs
- AutomationEvent.cs
- ControlPropertyNameConverter.cs
- PasswordDeriveBytes.cs
- DataServiceProcessingPipelineEventArgs.cs
- TypeReference.cs
- ModelItemCollectionImpl.cs
- FlowPanelDesigner.cs
- BitmapEffect.cs
- GlyphingCache.cs
- StringStorage.cs
- RightsManagementEncryptionTransform.cs
- SafePEFileHandle.cs
- DictionaryEntry.cs
- AutomationEventArgs.cs
- TypedReference.cs
- SafeHandle.cs
- PaintEvent.cs
- Debugger.cs
- ThrowHelper.cs
- PropertyChangedEventArgs.cs
- DbDataSourceEnumerator.cs
- MessageDecoder.cs
- RNGCryptoServiceProvider.cs
- ConsoleCancelEventArgs.cs
- WebControlsSection.cs
- SymDocumentType.cs
- StringReader.cs
- ToolboxItemFilterAttribute.cs
- TableProviderWrapper.cs
- SqlDataSourceCache.cs
- DataServiceKeyAttribute.cs
- MergeFailedEvent.cs
- DbConnectionPoolCounters.cs
- RenderData.cs
- WasHostedComPlusFactory.cs
- SecurityTokenException.cs
- CacheRequest.cs
- AssemblyName.cs
- ClientOptions.cs
- CompositeActivityCodeGenerator.cs
- RSAPKCS1SignatureFormatter.cs
- DesignerDataSchemaClass.cs
- CheckBox.cs
- PageEventArgs.cs
- PostBackOptions.cs
- DataGridViewIntLinkedList.cs
- RequiredFieldValidator.cs
- SharedStream.cs
- IxmlLineInfo.cs
- SpeechEvent.cs
- GeometryHitTestResult.cs
- SerializationHelper.cs
- BuildProviderCollection.cs
- SmtpSection.cs
- documentsequencetextcontainer.cs
- DataGridViewTextBoxEditingControl.cs
- StreamSecurityUpgradeInitiator.cs
- TextShapeableCharacters.cs
- StringToken.cs
- _TimerThread.cs
- WeakRefEnumerator.cs
- AccessViolationException.cs
- TableRow.cs
- dbdatarecord.cs
- SystemBrushes.cs
- TreeWalkHelper.cs
- CheckBoxBaseAdapter.cs
- SizeFConverter.cs
- XPathSelfQuery.cs
- ObjectSecurity.cs
- Baml2006KnownTypes.cs
- QilParameter.cs
- InstanceDataCollectionCollection.cs
- ColumnCollection.cs