Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ReadOnlyAttribute.cs / 1305376 / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Determines if this attribute is the default. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CopyOfAction.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- XPathNodeHelper.cs
- xamlnodes.cs
- PriorityBinding.cs
- IisTraceWebEventProvider.cs
- TextTreeRootNode.cs
- StylusTip.cs
- InfoCardMasterKey.cs
- MimeFormImporter.cs
- MessagePartDescription.cs
- AnnotationResourceChangedEventArgs.cs
- XpsSerializationManagerAsync.cs
- XmlSchemaComplexType.cs
- Bidi.cs
- CacheSection.cs
- SqlConnectionString.cs
- XmlArrayItemAttributes.cs
- objectresult_tresulttype.cs
- Gdiplus.cs
- DocumentsTrace.cs
- CompressedStack.cs
- TypeLoadException.cs
- ProgressBar.cs
- _OverlappedAsyncResult.cs
- TransformerInfoCollection.cs
- ScriptReferenceBase.cs
- EventRoute.cs
- FamilyTypeface.cs
- NotEqual.cs
- AppSecurityManager.cs
- SessionStateItemCollection.cs
- XmlSchemaException.cs
- EventLogPermissionAttribute.cs
- WebEventTraceProvider.cs
- Fonts.cs
- TraceListeners.cs
- UniformGrid.cs
- Decimal.cs
- NativeRightsManagementAPIsStructures.cs
- ElementAtQueryOperator.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- MetroSerializationManager.cs
- NullableConverter.cs
- UserControlFileEditor.cs
- WindowsSolidBrush.cs
- DnsPermission.cs
- DbParameterHelper.cs
- ChameleonKey.cs
- StandardCommandToolStripMenuItem.cs
- CqlGenerator.cs
- Int32Collection.cs
- SmiEventStream.cs
- ReadOnlyTernaryTree.cs
- ScriptReference.cs
- KoreanLunisolarCalendar.cs
- CompoundFileDeflateTransform.cs
- PtsCache.cs
- DispatchWrapper.cs
- XmlSerializableServices.cs
- DataGridViewDataConnection.cs
- ActiveXContainer.cs
- Drawing.cs
- DataGridViewImageColumn.cs
- FileLoadException.cs
- ServiceOperationDetailViewControl.cs
- OutOfMemoryException.cs
- DoWorkEventArgs.cs
- TimeoutConverter.cs
- counter.cs
- GlyphCollection.cs
- PenThreadPool.cs
- _TLSstream.cs
- WebServiceParameterData.cs
- DrawingAttributes.cs
- SymbolDocumentGenerator.cs
- DrawingCollection.cs
- FormattedTextSymbols.cs
- SqlFileStream.cs
- SessionStateModule.cs
- GeometryGroup.cs
- WindowsPrincipal.cs
- HashMembershipCondition.cs
- SemanticResultValue.cs
- CodeCompiler.cs
- SqlGatherConsumedAliases.cs
- LostFocusEventManager.cs
- PropertyGrid.cs
- FontStyles.cs
- precedingsibling.cs
- SQLConvert.cs
- GraphicsPathIterator.cs
- WinFormsUtils.cs
- PackageRelationshipCollection.cs
- BitVector32.cs
- TypeFieldSchema.cs
- RuleSetDialog.cs
- SizeF.cs
- FontStyle.cs
- BinaryHeap.cs