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
- TripleDESCryptoServiceProvider.cs
- CatalogPartChrome.cs
- HttpResponseInternalWrapper.cs
- ToolStripPanelSelectionGlyph.cs
- ExtenderProvidedPropertyAttribute.cs
- AppSecurityManager.cs
- DataViewManagerListItemTypeDescriptor.cs
- DetailsViewInsertEventArgs.cs
- CacheOutputQuery.cs
- FontStretchConverter.cs
- ResizeGrip.cs
- TemplateComponentConnector.cs
- OfTypeExpression.cs
- XPathExpr.cs
- TableRowGroup.cs
- CatalogZoneDesigner.cs
- PaperSize.cs
- FixedTextPointer.cs
- PropertyEmitter.cs
- smtpconnection.cs
- ScrollableControlDesigner.cs
- SdlChannelSink.cs
- FontEmbeddingManager.cs
- UIPropertyMetadata.cs
- ProcessHostConfigUtils.cs
- DocumentPropertiesDialog.cs
- PreservationFileWriter.cs
- ToolStripHighContrastRenderer.cs
- ControlPaint.cs
- HtmlTable.cs
- DataRelation.cs
- PropertiesTab.cs
- TableRow.cs
- FontSourceCollection.cs
- PublisherIdentityPermission.cs
- DependencyPropertyChangedEventArgs.cs
- ToolStripRenderEventArgs.cs
- SafeRightsManagementSessionHandle.cs
- ToolStripDropDownMenu.cs
- StrongNameSignatureInformation.cs
- SqlNodeAnnotation.cs
- IntranetCredentialPolicy.cs
- WebPart.cs
- DataExpression.cs
- LogicalExpressionTypeConverter.cs
- DataGridHelper.cs
- XamlFxTrace.cs
- CqlParser.cs
- CodeSnippetCompileUnit.cs
- MaskInputRejectedEventArgs.cs
- PipeException.cs
- ClientFactory.cs
- IntegrationExceptionEventArgs.cs
- BitmapPalettes.cs
- relpropertyhelper.cs
- XsltCompileContext.cs
- StorageAssociationTypeMapping.cs
- ObjectConverter.cs
- DrawListViewSubItemEventArgs.cs
- SelectionItemPattern.cs
- OleDbPropertySetGuid.cs
- IntSecurity.cs
- EventItfInfo.cs
- XPathDocument.cs
- METAHEADER.cs
- LicenseException.cs
- TogglePattern.cs
- HtmlForm.cs
- DBSqlParserColumnCollection.cs
- Transform3DCollection.cs
- VectorCollection.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XMLSyntaxException.cs
- FixedHyperLink.cs
- ControlBuilderAttribute.cs
- FrameworkContextData.cs
- MimeMultiPart.cs
- ManualResetEvent.cs
- ConfigXmlReader.cs
- CodeSnippetStatement.cs
- Matrix.cs
- ContextDataSourceView.cs
- AssemblyBuilderData.cs
- TemplateColumn.cs
- TextBox.cs
- NavigationWindowAutomationPeer.cs
- DynamicValueConverter.cs
- ErrorFormatter.cs
- PerformanceCounterManager.cs
- ByteAnimationBase.cs
- CustomDictionarySources.cs
- InputReportEventArgs.cs
- StylusCaptureWithinProperty.cs
- TemplateKey.cs
- RadialGradientBrush.cs
- BinaryObjectWriter.cs
- PagedDataSource.cs
- ObjectTypeMapping.cs
- IBuiltInEvidence.cs
- ExceptionUtil.cs