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
- XmlSecureResolver.cs
- OrthographicCamera.cs
- SqlFunctions.cs
- XslAstAnalyzer.cs
- DataGridToolTip.cs
- SQLBoolean.cs
- ContractNamespaceAttribute.cs
- ConfigurationStrings.cs
- Error.cs
- EntityClientCacheEntry.cs
- VectorCollectionConverter.cs
- MethodImplAttribute.cs
- SequenceDesigner.cs
- ExtendedProperty.cs
- SafeNativeMethods.cs
- ChangePassword.cs
- RangeValidator.cs
- FileFormatException.cs
- ActiveDocumentEvent.cs
- HitTestResult.cs
- RowToFieldTransformer.cs
- ComboBoxItem.cs
- RelationshipEnd.cs
- HandlerBase.cs
- TokenFactoryFactory.cs
- ScrollPatternIdentifiers.cs
- ComponentChangedEvent.cs
- TextAction.cs
- TransformDescriptor.cs
- EpmTargetPathSegment.cs
- DisplayInformation.cs
- GetPageNumberCompletedEventArgs.cs
- CoreSwitches.cs
- EnumMember.cs
- ExpressionBuilder.cs
- Win32.cs
- ValidationPropertyAttribute.cs
- BaseValidatorDesigner.cs
- ControlBuilderAttribute.cs
- rsa.cs
- EditingMode.cs
- FixedFindEngine.cs
- TextShapeableCharacters.cs
- ArgumentNullException.cs
- ContentFileHelper.cs
- localization.cs
- NullableFloatSumAggregationOperator.cs
- _ConnectOverlappedAsyncResult.cs
- Hex.cs
- CallbackValidator.cs
- CrossSiteScriptingValidation.cs
- UniqueIdentifierService.cs
- DiscardableAttribute.cs
- StringFreezingAttribute.cs
- WrappedIUnknown.cs
- PreservationFileWriter.cs
- BaseTreeIterator.cs
- ResourceCategoryAttribute.cs
- UnsafeNativeMethods.cs
- OrthographicCamera.cs
- PauseStoryboard.cs
- AssemblyAttributes.cs
- EntityCommandCompilationException.cs
- UnsafeNativeMethods.cs
- ConfigXmlWhitespace.cs
- BuildTopDownAttribute.cs
- JoinSymbol.cs
- ConfigurationElement.cs
- VBIdentifierName.cs
- AccessedThroughPropertyAttribute.cs
- ClientScriptManager.cs
- HttpDebugHandler.cs
- ControlAdapter.cs
- SelectionRangeConverter.cs
- ImplicitInputBrush.cs
- NCryptNative.cs
- ArgumentOutOfRangeException.cs
- DecimalStorage.cs
- MdiWindowListStrip.cs
- MD5Cng.cs
- XmlAttributeCollection.cs
- SizeValueSerializer.cs
- WebPartCloseVerb.cs
- MetadataHelper.cs
- Listbox.cs
- DeviceFiltersSection.cs
- ZipIOModeEnforcingStream.cs
- SiteOfOriginPart.cs
- UntrustedRecipientException.cs
- Gdiplus.cs
- MessageQueueEnumerator.cs
- NamespaceEmitter.cs
- CultureTable.cs
- OutputCacheModule.cs
- EventManager.cs
- HttpAsyncResult.cs
- PageOrientation.cs
- FilteredXmlReader.cs
- RootAction.cs
- WeakReference.cs