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
- DataColumnChangeEvent.cs
- EventProxy.cs
- UIAgentMonitor.cs
- RsaSecurityTokenParameters.cs
- MSAAEventDispatcher.cs
- SqlConnectionFactory.cs
- XmlDesignerDataSourceView.cs
- CSharpCodeProvider.cs
- DataGridRelationshipRow.cs
- SystemUdpStatistics.cs
- TemplateXamlParser.cs
- TransformValueSerializer.cs
- MatchAllMessageFilter.cs
- BindingBase.cs
- WmpBitmapEncoder.cs
- SchemaConstraints.cs
- DefaultSerializationProviderAttribute.cs
- BitStream.cs
- DataGridClipboardCellContent.cs
- TraceHwndHost.cs
- ObjectViewListener.cs
- BinaryNode.cs
- Item.cs
- CommandEventArgs.cs
- UserControl.cs
- GacUtil.cs
- SymbolEqualComparer.cs
- BinaryMethodMessage.cs
- HttpRuntime.cs
- RectKeyFrameCollection.cs
- UnsafeNativeMethods.cs
- LineProperties.cs
- InvalidFilterCriteriaException.cs
- CfgParser.cs
- UniqueID.cs
- SourceFilter.cs
- AssociatedControlConverter.cs
- ParallelTimeline.cs
- SqlProcedureAttribute.cs
- SafeReadContext.cs
- DefaultEventAttribute.cs
- MenuItemBindingCollection.cs
- ProgressBar.cs
- BooleanToVisibilityConverter.cs
- AssemblyCollection.cs
- SpotLight.cs
- ToolStripMenuItemCodeDomSerializer.cs
- PeerNameRecord.cs
- ToolStripDropDown.cs
- RegisteredHiddenField.cs
- __TransparentProxy.cs
- SerializationEventsCache.cs
- FormatSelectingMessageInspector.cs
- LogLogRecordEnumerator.cs
- ValidatingPropertiesEventArgs.cs
- ToolStripDropTargetManager.cs
- XmlSchemaFacet.cs
- XmlValidatingReader.cs
- Visual3DCollection.cs
- PersianCalendar.cs
- OdbcRowUpdatingEvent.cs
- InstanceKeyNotReadyException.cs
- MediaTimeline.cs
- DataGridViewCellLinkedList.cs
- DbConvert.cs
- SafeProcessHandle.cs
- ContentDesigner.cs
- Visual3DCollection.cs
- Point4DConverter.cs
- XmlNamedNodeMap.cs
- BindingCompleteEventArgs.cs
- ControlBindingsCollection.cs
- SmtpAuthenticationManager.cs
- ExpressionBuilder.cs
- MenuCommands.cs
- ThreadStaticAttribute.cs
- _LocalDataStore.cs
- HttpCookiesSection.cs
- LabelDesigner.cs
- DataGridItemAutomationPeer.cs
- MouseButtonEventArgs.cs
- TargetParameterCountException.cs
- X509ChainPolicy.cs
- ObjectCache.cs
- SqlProcedureAttribute.cs
- ControlType.cs
- SingleObjectCollection.cs
- UnsafeNativeMethods.cs
- SectionInformation.cs
- ExpressionVisitorHelpers.cs
- AdornerDecorator.cs
- LogicalMethodInfo.cs
- HashCodeCombiner.cs
- UniqueIdentifierService.cs
- TextSerializer.cs
- TcpAppDomainProtocolHandler.cs
- PageAsyncTask.cs
- PkcsUtils.cs
- LoginNameDesigner.cs
- CacheMode.cs