Code:
/ FX-1434 / FX-1434 / 1.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
- Queue.cs
- BufferedStream.cs
- XappLauncher.cs
- SystemIPGlobalStatistics.cs
- ResXDataNode.cs
- DesignerActionUI.cs
- ReferentialConstraint.cs
- TableLayoutSettings.cs
- ConversionContext.cs
- XamlWrappingReader.cs
- SatelliteContractVersionAttribute.cs
- InputScopeNameConverter.cs
- SoundPlayerAction.cs
- Decorator.cs
- PreviousTrackingServiceAttribute.cs
- SimpleWebHandlerParser.cs
- TypeFieldSchema.cs
- RenamedEventArgs.cs
- SiteMapPathDesigner.cs
- IndexingContentUnit.cs
- ResponseBodyWriter.cs
- Substitution.cs
- DbConnectionStringCommon.cs
- ApplicationId.cs
- shaperfactoryquerycacheentry.cs
- RegexBoyerMoore.cs
- TargetControlTypeCache.cs
- FunctionQuery.cs
- DataViewManager.cs
- Icon.cs
- HotSpotCollection.cs
- BinaryWriter.cs
- BindingList.cs
- DbProviderFactories.cs
- CommandID.cs
- TdsEnums.cs
- RangeValidator.cs
- InvalidOleVariantTypeException.cs
- EditorPartCollection.cs
- RelationshipEndCollection.cs
- Message.cs
- ComponentConverter.cs
- OleStrCAMarshaler.cs
- CompModHelpers.cs
- TcpConnectionPoolSettingsElement.cs
- DrawingBrush.cs
- FileVersionInfo.cs
- QilDataSource.cs
- XmlSchemaAll.cs
- DataControlFieldHeaderCell.cs
- TemplateBuilder.cs
- XappLauncher.cs
- ObjectCloneHelper.cs
- WeakReference.cs
- DocumentViewerBase.cs
- RowBinding.cs
- NativeMethods.cs
- EventData.cs
- OleDbWrapper.cs
- UnitySerializationHolder.cs
- DPCustomTypeDescriptor.cs
- Transform.cs
- cache.cs
- OperatingSystem.cs
- Int32Animation.cs
- TextRangeEdit.cs
- DigestTraceRecordHelper.cs
- OperationAbortedException.cs
- FilterException.cs
- ExternalCalls.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- HelpProvider.cs
- CheckedListBox.cs
- StorageModelBuildProvider.cs
- SettingsAttributes.cs
- SQLDoubleStorage.cs
- SimpleApplicationHost.cs
- FindResponse.cs
- XslException.cs
- ObjectStateEntryDbDataRecord.cs
- ApplicationSecurityInfo.cs
- WebPartDisplayModeCollection.cs
- SearchForVirtualItemEventArgs.cs
- XmlWellformedWriterHelpers.cs
- CommonDialog.cs
- IntMinMaxAggregationOperator.cs
- DefaultTextStoreTextComposition.cs
- LinearKeyFrames.cs
- XmlWrappingReader.cs
- SourceChangedEventArgs.cs
- GatewayDefinition.cs
- BrowserDefinitionCollection.cs
- XmlSchemaSimpleTypeRestriction.cs
- ExpressionBuilderContext.cs
- ResourceProviderFactory.cs
- DrawingImage.cs
- GiveFeedbackEvent.cs
- ThreadStateException.cs
- OverrideMode.cs
- DataPagerFieldItem.cs