Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }/// Determines if this attribute is the default. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UriScheme.cs
- MonitoringDescriptionAttribute.cs
- MetadataItemEmitter.cs
- XmlQuerySequence.cs
- AssemblyInfo.cs
- FilterQuery.cs
- COAUTHIDENTITY.cs
- WorkflowViewElement.cs
- FunctionMappingTranslator.cs
- CreationContext.cs
- XPathEmptyIterator.cs
- MsmqIntegrationChannelFactory.cs
- SmiXetterAccessMap.cs
- BitmapEffectvisualstate.cs
- DbConnectionHelper.cs
- SqlSelectStatement.cs
- Privilege.cs
- StyleTypedPropertyAttribute.cs
- SamlDelegatingWriter.cs
- CryptoKeySecurity.cs
- ImageSource.cs
- Evidence.cs
- _TransmitFileOverlappedAsyncResult.cs
- ToolStripItemDataObject.cs
- Stack.cs
- HebrewCalendar.cs
- OracleNumber.cs
- OleDbReferenceCollection.cs
- PerformanceCounterLib.cs
- DataViewSetting.cs
- VectorAnimationUsingKeyFrames.cs
- WebPartConnectionsCancelVerb.cs
- NameNode.cs
- RestrictedTransactionalPackage.cs
- ComboBox.cs
- CopyAction.cs
- ContentType.cs
- CmsInterop.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ValueType.cs
- DataGridViewBand.cs
- ExceptQueryOperator.cs
- RelativeSource.cs
- XmlBindingWorker.cs
- BamlResourceContent.cs
- SevenBitStream.cs
- UrlAuthorizationModule.cs
- VarRemapper.cs
- ExtenderProviderService.cs
- DecoderFallback.cs
- BinaryObjectInfo.cs
- SplitContainer.cs
- ConfigurationValidatorAttribute.cs
- RtfToXamlReader.cs
- XmlAnyElementAttribute.cs
- String.cs
- ScrollChrome.cs
- CommandValueSerializer.cs
- SortExpressionBuilder.cs
- DateTimeOffset.cs
- BooleanSwitch.cs
- MetadataPropertyvalue.cs
- AsyncSerializedWorker.cs
- SafeJobHandle.cs
- AttributeProviderAttribute.cs
- CodeArrayCreateExpression.cs
- XslCompiledTransform.cs
- DataKeyCollection.cs
- ActivityExecutorDelegateInfo.cs
- ToolStripDropDown.cs
- IntegerFacetDescriptionElement.cs
- StrokeRenderer.cs
- GridViewRowPresenterBase.cs
- CorruptingExceptionCommon.cs
- DataGridViewUtilities.cs
- GenericEnumConverter.cs
- embossbitmapeffect.cs
- TextDecorationUnitValidation.cs
- ViewCellRelation.cs
- OracleConnectionStringBuilder.cs
- TimeSpan.cs
- TriggerCollection.cs
- ToolStripGripRenderEventArgs.cs
- oledbmetadatacollectionnames.cs
- EventArgs.cs
- TransformCryptoHandle.cs
- SqlDataRecord.cs
- SchemaManager.cs
- SeparatorAutomationPeer.cs
- XmlILModule.cs
- ArrayTypeMismatchException.cs
- _HeaderInfo.cs
- HwndPanningFeedback.cs
- XmlSchemaComplexContentRestriction.cs
- ClockGroup.cs
- WebConfigurationHostFileChange.cs
- ColumnTypeConverter.cs
- ViewManager.cs
- xml.cs
- CompatibleComparer.cs