Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- RectangleHotSpot.cs
- TableParaClient.cs
- XmlNamedNodeMap.cs
- Int32Converter.cs
- SQLMoney.cs
- BooleanExpr.cs
- CultureData.cs
- MailAddressCollection.cs
- WebPartZoneBaseDesigner.cs
- SchemaElementLookUpTable.cs
- FormViewDeleteEventArgs.cs
- WebMessageEncodingElement.cs
- EntityDataSourceWrapperCollection.cs
- SHA1CryptoServiceProvider.cs
- FlagsAttribute.cs
- TransformDescriptor.cs
- WebBrowserNavigatingEventHandler.cs
- HitTestParameters3D.cs
- PKCS1MaskGenerationMethod.cs
- HyperLinkField.cs
- SwitchDesigner.xaml.cs
- XPathDescendantIterator.cs
- DemultiplexingClientMessageFormatter.cs
- TimeSpanStorage.cs
- BypassElement.cs
- ProfileService.cs
- HttpCookieCollection.cs
- X509Utils.cs
- DrawingImage.cs
- GenericXmlSecurityToken.cs
- XmlHierarchyData.cs
- ServiceInstanceProvider.cs
- RestrictedTransactionalPackage.cs
- PreviewPageInfo.cs
- ClientSettingsStore.cs
- SQLDouble.cs
- SpecialFolderEnumConverter.cs
- FontEditor.cs
- EncryptedType.cs
- XmlNodeChangedEventManager.cs
- GridViewColumnCollectionChangedEventArgs.cs
- GridViewActionList.cs
- GradientBrush.cs
- HandlerMappingMemo.cs
- ColorKeyFrameCollection.cs
- PasswordRecovery.cs
- CompoundFileDeflateTransform.cs
- InkCanvas.cs
- WindowHideOrCloseTracker.cs
- ObjectManager.cs
- FlowDocumentScrollViewer.cs
- ControlBuilder.cs
- ACL.cs
- FloatUtil.cs
- LocalizableAttribute.cs
- MetadataFile.cs
- KeyValueSerializer.cs
- ADRole.cs
- HttpRawResponse.cs
- WindowsFormsSectionHandler.cs
- ComplexPropertyEntry.cs
- Rfc2898DeriveBytes.cs
- ListView.cs
- RequiredAttributeAttribute.cs
- EntityTypeBase.cs
- FunctionQuery.cs
- CodeSnippetTypeMember.cs
- SqlUtil.cs
- FixedTextPointer.cs
- CaseInsensitiveComparer.cs
- SystemWebSectionGroup.cs
- _IPv6Address.cs
- ImageList.cs
- Soap.cs
- Container.cs
- DataStreamFromComStream.cs
- ReturnType.cs
- Socket.cs
- FastEncoderWindow.cs
- CalendarTable.cs
- Models.cs
- CornerRadiusConverter.cs
- FixedDocumentPaginator.cs
- CroppedBitmap.cs
- ProtocolElement.cs
- XamlContextStack.cs
- CodeMemberField.cs
- X509AsymmetricSecurityKey.cs
- ButtonBase.cs
- DataSourceDescriptorCollection.cs
- EventTrigger.cs
- XamlParser.cs
- HttpListenerContext.cs
- SatelliteContractVersionAttribute.cs
- NameTable.cs
- ConfigurationStrings.cs
- IODescriptionAttribute.cs
- Point4D.cs
- XmlSchemaSubstitutionGroup.cs
- DataGridViewAccessibleObject.cs