Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Determines if this attribute is the default. /// ///// 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
- VectorAnimation.cs
- CodeNamespaceImport.cs
- EntityParameter.cs
- HtmlInputFile.cs
- ComplexLine.cs
- DataGridViewRowsRemovedEventArgs.cs
- HtmlInputRadioButton.cs
- MethodBuilder.cs
- DateTimeFormatInfo.cs
- ContentDisposition.cs
- ThumbAutomationPeer.cs
- WindowsUpDown.cs
- GridViewDeletedEventArgs.cs
- DataQuery.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- XpsResourceDictionary.cs
- Utilities.cs
- SqlProfileProvider.cs
- TcpClientSocketManager.cs
- assemblycache.cs
- ContentPlaceHolder.cs
- ListenerElementsCollection.cs
- HTTPNotFoundHandler.cs
- NumberFormatter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- EditorServiceContext.cs
- XomlCompilerHelpers.cs
- HtmlTableCell.cs
- Brushes.cs
- propertyentry.cs
- HtmlShim.cs
- ViewGenerator.cs
- UrlMappingsSection.cs
- CodeAttributeDeclarationCollection.cs
- SafeBitVector32.cs
- BindingEntityInfo.cs
- CalculatedColumn.cs
- GlyphRun.cs
- XmlTextAttribute.cs
- DocComment.cs
- KeysConverter.cs
- TextElementEnumerator.cs
- DiagnosticTrace.cs
- Range.cs
- SqlConnectionPoolProviderInfo.cs
- DbParameterHelper.cs
- MeasurementDCInfo.cs
- InternalBase.cs
- PackWebRequest.cs
- Message.cs
- Dump.cs
- InternalUserCancelledException.cs
- VectorConverter.cs
- JumpList.cs
- UniqueIdentifierService.cs
- ObservableCollection.cs
- DataGridItemCollection.cs
- FactoryGenerator.cs
- CacheDependency.cs
- PrintSystemException.cs
- Errors.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- CssTextWriter.cs
- WindowsUpDown.cs
- UIElementIsland.cs
- errorpatternmatcher.cs
- PlatformCulture.cs
- UpdateExpressionVisitor.cs
- TypeSystemProvider.cs
- CompilationLock.cs
- ManagementException.cs
- EndEvent.cs
- CFGGrammar.cs
- StreamingContext.cs
- DataGridPageChangedEventArgs.cs
- PropertyBuilder.cs
- PrintPreviewDialog.cs
- WsatRegistrationHeader.cs
- NativeMethods.cs
- SvcMapFile.cs
- AutomationEventArgs.cs
- TimelineClockCollection.cs
- ArrangedElement.cs
- DataGridViewTextBoxCell.cs
- ResourceManager.cs
- unsafenativemethodsother.cs
- TreePrinter.cs
- SelectionEditor.cs
- WindowsPrincipal.cs
- TextLine.cs
- MergePropertyDescriptor.cs
- LongValidator.cs
- DistinctQueryOperator.cs
- PartialCachingControl.cs
- WorkflowTransactionService.cs
- NavigatorOutput.cs
- TextRangeAdaptor.cs
- QueryException.cs
- InputQueue.cs
- BooleanExpr.cs