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
- DataKeyCollection.cs
- CheckBoxList.cs
- BufferBuilder.cs
- BezierSegment.cs
- path.cs
- SchemaContext.cs
- XmlAttributeProperties.cs
- HyperLinkDesigner.cs
- LocalServiceSecuritySettings.cs
- ResolveRequestResponseAsyncResult.cs
- MemberCollection.cs
- PtsContext.cs
- ReferenceSchema.cs
- ActiveXHost.cs
- PageParserFilter.cs
- SecurityCookieModeValidator.cs
- LogicalExpr.cs
- filewebresponse.cs
- ControlIdConverter.cs
- HttpListenerRequest.cs
- OleDbPermission.cs
- SetterBase.cs
- Constraint.cs
- EncryptedPackageFilter.cs
- InputBindingCollection.cs
- FunctionImportMapping.cs
- ConditionalDesigner.cs
- SymbolType.cs
- PenThread.cs
- FixedTextSelectionProcessor.cs
- ServiceDiscoveryBehavior.cs
- ClientCredentialsSecurityTokenManager.cs
- ConnectionStringsExpressionBuilder.cs
- PolyBezierSegment.cs
- MenuCommand.cs
- GenerateScriptTypeAttribute.cs
- HwndPanningFeedback.cs
- HandleExceptionArgs.cs
- List.cs
- WindowsEditBoxRange.cs
- Util.cs
- PeerToPeerException.cs
- NeutralResourcesLanguageAttribute.cs
- CustomErrorCollection.cs
- UserControlAutomationPeer.cs
- DirectoryRedirect.cs
- StateManager.cs
- CharEnumerator.cs
- XmlSchemaElement.cs
- CustomErrorsSectionWrapper.cs
- OletxCommittableTransaction.cs
- AppSettingsExpressionBuilder.cs
- XmlObjectSerializerContext.cs
- PortCache.cs
- ToolBar.cs
- OleDbDataReader.cs
- BinaryConverter.cs
- ImageField.cs
- ListCollectionView.cs
- unitconverter.cs
- DelimitedListTraceListener.cs
- RegexInterpreter.cs
- ManualResetEvent.cs
- FontSourceCollection.cs
- WebSysDisplayNameAttribute.cs
- GraphicsPathIterator.cs
- TextEditorCharacters.cs
- MachineKeySection.cs
- PreApplicationStartMethodAttribute.cs
- Pkcs9Attribute.cs
- ModelUIElement3D.cs
- GPRECTF.cs
- TableLayout.cs
- SortFieldComparer.cs
- IndexedString.cs
- SoapSchemaImporter.cs
- ResolvedKeyFrameEntry.cs
- SelectedPathEditor.cs
- WebEvents.cs
- base64Transforms.cs
- HandleCollector.cs
- WebPermission.cs
- ObjectKeyFrameCollection.cs
- MemoryPressure.cs
- BinaryCommonClasses.cs
- RuleDefinitions.cs
- XPathQilFactory.cs
- LogicalTreeHelper.cs
- ManipulationStartingEventArgs.cs
- UrlMappingsSection.cs
- UrlMappingsSection.cs
- XmlSchemaSequence.cs
- SecurityContext.cs
- ContentPlaceHolder.cs
- XmlSchemaNotation.cs
- PersistChildrenAttribute.cs
- WindowsIdentity.cs
- TreeBuilder.cs
- EventMappingSettings.cs
- WebService.cs