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
- MouseButton.cs
- RectangleGeometry.cs
- ExponentialEase.cs
- SafeBitVector32.cs
- XmlSerializationGeneratedCode.cs
- EntityCommandCompilationException.cs
- StringConverter.cs
- FormViewModeEventArgs.cs
- Pen.cs
- ButtonFlatAdapter.cs
- WeakReferenceList.cs
- TdsParserStaticMethods.cs
- StringComparer.cs
- DeferredElementTreeState.cs
- IPHostEntry.cs
- CodeMemberMethod.cs
- RegexWorker.cs
- ParameterCollection.cs
- TableAdapterManagerMethodGenerator.cs
- MenuTracker.cs
- TextDecoration.cs
- SoapFormatter.cs
- GlobalizationSection.cs
- RecordManager.cs
- Rect3DValueSerializer.cs
- ProcessHostConfigUtils.cs
- Int32Storage.cs
- IHttpResponseInternal.cs
- AutomationEventArgs.cs
- ExpressionContext.cs
- BindingGroup.cs
- SystemIPAddressInformation.cs
- WebPartConnectionsEventArgs.cs
- Translator.cs
- RbTree.cs
- ToolStripContentPanelRenderEventArgs.cs
- ComplexTypeEmitter.cs
- ObfuscateAssemblyAttribute.cs
- Timer.cs
- PresentationAppDomainManager.cs
- AddressingVersion.cs
- AuthenticodeSignatureInformation.cs
- Receive.cs
- QueueException.cs
- SqlComparer.cs
- HexParser.cs
- DesignTimeType.cs
- DataRecordInfo.cs
- PreviewPageInfo.cs
- TableLayoutCellPaintEventArgs.cs
- SQLInt64.cs
- ResXResourceWriter.cs
- ThreadPoolTaskScheduler.cs
- ControlSerializer.cs
- ProfileBuildProvider.cs
- PropertyInfoSet.cs
- ConfigXmlCDataSection.cs
- AvTrace.cs
- FunctionDescription.cs
- ToolboxItemFilterAttribute.cs
- RequiredAttributeAttribute.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- XPathBuilder.cs
- CustomSignedXml.cs
- DataGridTablesFactory.cs
- ASCIIEncoding.cs
- Assign.cs
- CodeDirectionExpression.cs
- BoundConstants.cs
- EtwTrace.cs
- RequestResponse.cs
- Decimal.cs
- SatelliteContractVersionAttribute.cs
- ParallelActivityDesigner.cs
- GridViewColumnCollection.cs
- TextSpanModifier.cs
- GroupQuery.cs
- Stack.cs
- PreviewPageInfo.cs
- SplitterEvent.cs
- NestPullup.cs
- SkinBuilder.cs
- SoapObjectReader.cs
- DBAsyncResult.cs
- ScriptReferenceBase.cs
- Encoding.cs
- WorkflowMessageEventHandler.cs
- OleStrCAMarshaler.cs
- TextViewSelectionProcessor.cs
- WpfKnownMember.cs
- TextTrailingCharacterEllipsis.cs
- WizardPanel.cs
- SoundPlayer.cs
- PartialTrustValidationBehavior.cs
- DataGridViewBand.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- PopupEventArgs.cs
- StructuredCompositeActivityDesigner.cs
- KnownIds.cs
- sortedlist.cs