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
- ScriptReference.cs
- WinEventQueueItem.cs
- ToolStripArrowRenderEventArgs.cs
- AssociativeAggregationOperator.cs
- ImageDrawing.cs
- DataGridToolTip.cs
- EntityDataSourceReferenceGroup.cs
- UInt16Converter.cs
- PageThemeParser.cs
- RenderDataDrawingContext.cs
- RC2.cs
- ActivatedMessageQueue.cs
- ElementHostPropertyMap.cs
- WorkflowHostingEndpoint.cs
- ComponentResourceManager.cs
- ErrorHandler.cs
- CounterCreationData.cs
- DataGridToolTip.cs
- RefreshPropertiesAttribute.cs
- x509utils.cs
- IndexOutOfRangeException.cs
- ValidatorCollection.cs
- MethodImplAttribute.cs
- DataTableNewRowEvent.cs
- EncodingStreamWrapper.cs
- TraceLog.cs
- LoadedOrUnloadedOperation.cs
- _NestedMultipleAsyncResult.cs
- CompilerGeneratedAttribute.cs
- BitConverter.cs
- IntPtr.cs
- WebBrowserNavigatingEventHandler.cs
- DataTableNewRowEvent.cs
- ListViewItemMouseHoverEvent.cs
- SqlDependencyListener.cs
- InternalBufferOverflowException.cs
- XPathDescendantIterator.cs
- Registry.cs
- BaseProcessor.cs
- EncoderParameter.cs
- BindingSource.cs
- SafeNativeMemoryHandle.cs
- ScriptDescriptor.cs
- ModifierKeysValueSerializer.cs
- SupportsEventValidationAttribute.cs
- MetadataItemEmitter.cs
- BuildManager.cs
- UInt32Converter.cs
- RotationValidation.cs
- WebControlsSection.cs
- DataRow.cs
- DropTarget.cs
- Geometry.cs
- TextFormatter.cs
- TdsRecordBufferSetter.cs
- KnownBoxes.cs
- AccessDataSourceView.cs
- RNGCryptoServiceProvider.cs
- XmlSchema.cs
- XmlSchemaExporter.cs
- PopOutPanel.cs
- OpenTypeLayoutCache.cs
- ResourceDictionaryCollection.cs
- LeaseManager.cs
- TextBoxRenderer.cs
- XmlCharCheckingWriter.cs
- PrintingPermission.cs
- DeferredSelectedIndexReference.cs
- ArrayConverter.cs
- ProgramPublisher.cs
- RtfFormatStack.cs
- IDictionary.cs
- IndexedString.cs
- TextModifierScope.cs
- TimeSpanOrInfiniteValidator.cs
- StylusPointPropertyInfoDefaults.cs
- Int32EqualityComparer.cs
- URLBuilder.cs
- ComponentChangingEvent.cs
- GPPOINT.cs
- Visitor.cs
- PrincipalPermission.cs
- TextLineResult.cs
- CodeExpressionStatement.cs
- MSG.cs
- _CommandStream.cs
- PrimaryKeyTypeConverter.cs
- SecurityUtils.cs
- XmlChoiceIdentifierAttribute.cs
- BinaryFormatter.cs
- MergePropertyDescriptor.cs
- UnconditionalPolicy.cs
- TraceEventCache.cs
- ListMarkerLine.cs
- BitArray.cs
- UIElementPropertyUndoUnit.cs
- Mapping.cs
- ConnectionStringSettingsCollection.cs
- CompositeCollection.cs
- EndpointPerformanceCounters.cs