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
- Mouse.cs
- EditorPart.cs
- HideDisabledControlAdapter.cs
- CharConverter.cs
- CommandLibraryHelper.cs
- MethodBuilder.cs
- AssociationType.cs
- MetadataSource.cs
- objectquery_tresulttype.cs
- UrlPropertyAttribute.cs
- TextLineBreak.cs
- SendMailErrorEventArgs.cs
- ViewCellRelation.cs
- XmlCharCheckingReader.cs
- ContentDesigner.cs
- Vars.cs
- SqlCaseSimplifier.cs
- ToolStripItemCollection.cs
- DataGridHeaderBorder.cs
- CodeTypeDelegate.cs
- BitArray.cs
- RadioButton.cs
- StrokeNodeData.cs
- SamlSecurityToken.cs
- _HeaderInfo.cs
- GuidTagList.cs
- MenuItemStyle.cs
- CompilerState.cs
- FunctionCommandText.cs
- TypedTableHandler.cs
- NamedPermissionSet.cs
- EdmValidator.cs
- DrawingImage.cs
- PrintPreviewGraphics.cs
- SkinBuilder.cs
- VScrollBar.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ListControl.cs
- XamlSerializerUtil.cs
- ConfigXmlComment.cs
- SafeFindHandle.cs
- MeasurementDCInfo.cs
- AssociatedControlConverter.cs
- SByte.cs
- WrapPanel.cs
- NameValueFileSectionHandler.cs
- MetafileHeader.cs
- ListSortDescription.cs
- XmlSerializerNamespaces.cs
- LinkArea.cs
- _SSPIWrapper.cs
- SqlLiftIndependentRowExpressions.cs
- TokenizerHelper.cs
- Terminate.cs
- TypeConverters.cs
- ObjectDataSourceFilteringEventArgs.cs
- WebPartConnectionsDisconnectVerb.cs
- PageBuildProvider.cs
- AnnotationAdorner.cs
- WizardPanelChangingEventArgs.cs
- JsonFormatGeneratorStatics.cs
- ImplicitInputBrush.cs
- ViewCellRelation.cs
- SecurityTokenException.cs
- RadialGradientBrush.cs
- EventKeyword.cs
- CodeThrowExceptionStatement.cs
- VariantWrapper.cs
- SHA512Managed.cs
- DateTimeParse.cs
- BaseResourcesBuildProvider.cs
- CheckBoxStandardAdapter.cs
- DomainUpDown.cs
- GridViewUpdatedEventArgs.cs
- XmlSchemaIdentityConstraint.cs
- FileClassifier.cs
- XmlNamespaceDeclarationsAttribute.cs
- AdapterSwitches.cs
- TextTreeInsertElementUndoUnit.cs
- PageCatalogPart.cs
- Grant.cs
- EncodingFallbackAwareXmlTextWriter.cs
- CompensationTokenData.cs
- ConsoleTraceListener.cs
- UserMapPath.cs
- DynamicFilter.cs
- XmlUtil.cs
- ControlBindingsCollection.cs
- KeyInterop.cs
- PasswordRecovery.cs
- ValidationEventArgs.cs
- Padding.cs
- WebSysDisplayNameAttribute.cs
- Size.cs
- Brush.cs
- StringTraceRecord.cs
- DataRowChangeEvent.cs
- DependencyPropertyAttribute.cs
- HtmlHead.cs
- MessageQueueKey.cs