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
- NominalTypeEliminator.cs
- XmlName.cs
- XmlWrappingReader.cs
- recordstate.cs
- ScrollItemPattern.cs
- QuaternionIndependentAnimationStorage.cs
- JoinSymbol.cs
- ActivityBindForm.Designer.cs
- NotSupportedException.cs
- NetCodeGroup.cs
- PrivacyNoticeBindingElement.cs
- ExtractorMetadata.cs
- ArraySegment.cs
- RtfControls.cs
- ObjectDataSourceMethodEventArgs.cs
- EventDescriptor.cs
- CleanUpVirtualizedItemEventArgs.cs
- DomainLiteralReader.cs
- WebBrowsableAttribute.cs
- WindowsIdentity.cs
- FixedLineResult.cs
- RequestNavigateEventArgs.cs
- InfoCardSchemas.cs
- TransformerInfo.cs
- BaseTemplateBuildProvider.cs
- SolidColorBrush.cs
- WebPartCatalogAddVerb.cs
- dataprotectionpermission.cs
- MembershipUser.cs
- BamlBinaryWriter.cs
- FixedHighlight.cs
- NavigationEventArgs.cs
- UInt64Converter.cs
- ListParagraph.cs
- XPathNode.cs
- SelectionRange.cs
- Privilege.cs
- ImageMap.cs
- WaitForChangedResult.cs
- CurrentTimeZone.cs
- FormViewUpdateEventArgs.cs
- DynamicResourceExtensionConverter.cs
- TextComposition.cs
- AddingNewEventArgs.cs
- SafeThreadHandle.cs
- ObjectCloneHelper.cs
- WebPartEditorApplyVerb.cs
- XmlDataDocument.cs
- Validator.cs
- DataGridViewRow.cs
- ButtonPopupAdapter.cs
- BinaryCommonClasses.cs
- PropertyEntry.cs
- PropertyReference.cs
- PageBreakRecord.cs
- XmlSchemaObject.cs
- EnumValAlphaComparer.cs
- FixedSchema.cs
- NonDualMessageSecurityOverHttpElement.cs
- HttpContext.cs
- BackStopAuthenticationModule.cs
- PKCS1MaskGenerationMethod.cs
- Scheduler.cs
- BamlVersionHeader.cs
- ServiceMetadataPublishingElement.cs
- AssociatedControlConverter.cs
- ProcessingInstructionAction.cs
- ChannelServices.cs
- X509Certificate.cs
- X509AsymmetricSecurityKey.cs
- VisualTarget.cs
- PassportAuthenticationEventArgs.cs
- ClientTargetSection.cs
- ConfigurationSectionGroupCollection.cs
- IResourceProvider.cs
- ColorTransform.cs
- ViewManager.cs
- Empty.cs
- ListMarkerSourceInfo.cs
- ToggleButtonAutomationPeer.cs
- LateBoundBitmapDecoder.cs
- DataGridColumnHeaderAutomationPeer.cs
- DataGridColumnReorderingEventArgs.cs
- ModuleBuilder.cs
- UInt16Converter.cs
- NotifyInputEventArgs.cs
- NullRuntimeConfig.cs
- Context.cs
- CheckedListBox.cs
- ClientSponsor.cs
- WinFormsComponentEditor.cs
- InvalidComObjectException.cs
- QilXmlWriter.cs
- DataBindingHandlerAttribute.cs
- DSASignatureFormatter.cs
- XmlDomTextWriter.cs
- AuthenticationManager.cs
- WindowsListBox.cs
- TrackingDataItemValue.cs
- Keywords.cs