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
- ScriptReference.cs
- LogSwitch.cs
- SkinBuilder.cs
- DataConnectionHelper.cs
- BaseCAMarshaler.cs
- AutomationPropertyInfo.cs
- GraphicsPath.cs
- DataTableClearEvent.cs
- SerializableAttribute.cs
- ConfigurationStrings.cs
- StringValidator.cs
- EntityContainerAssociationSetEnd.cs
- GradientBrush.cs
- ServiceDocumentFormatter.cs
- BackStopAuthenticationModule.cs
- InternalBufferOverflowException.cs
- QueryStringParameter.cs
- MailAddress.cs
- WebBrowserNavigatedEventHandler.cs
- ZipArchive.cs
- RoleManagerSection.cs
- MarshalByRefObject.cs
- CollectionView.cs
- FrameSecurityDescriptor.cs
- UserValidatedEventArgs.cs
- CultureSpecificStringDictionary.cs
- SkewTransform.cs
- CatalogPartChrome.cs
- BooleanStorage.cs
- CapabilitiesRule.cs
- DecoderFallbackWithFailureFlag.cs
- AccessDataSourceView.cs
- EllipseGeometry.cs
- TypeConverterValueSerializer.cs
- AliasGenerator.cs
- DetailsView.cs
- SafeEventLogWriteHandle.cs
- FixedSOMPageConstructor.cs
- SafeSecurityHelper.cs
- TypeUtil.cs
- Column.cs
- DetailsViewUpdateEventArgs.cs
- EdmFunction.cs
- MetadataWorkspace.cs
- StreamGeometryContext.cs
- FindSimilarActivitiesVerb.cs
- PageRouteHandler.cs
- DirectoryObjectSecurity.cs
- ConnectionStringSettingsCollection.cs
- IFlowDocumentViewer.cs
- MetaModel.cs
- WinFormsSpinner.cs
- URLIdentityPermission.cs
- LinkedList.cs
- SiteMapHierarchicalDataSourceView.cs
- DataTableClearEvent.cs
- UpdatePanelControlTrigger.cs
- MultilineStringConverter.cs
- AttributeInfo.cs
- XhtmlConformanceSection.cs
- BuildProvidersCompiler.cs
- ApplicationContext.cs
- ManagementEventArgs.cs
- NetworkInterface.cs
- FixedNode.cs
- XmlSchemaParticle.cs
- KnownBoxes.cs
- SynchronizingStream.cs
- FontTypeConverter.cs
- MenuItem.cs
- ResourceReferenceKeyNotFoundException.cs
- CurrentChangedEventManager.cs
- Types.cs
- InteropExecutor.cs
- CultureInfoConverter.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- GradientStopCollection.cs
- Privilege.cs
- TypeSystem.cs
- TileBrush.cs
- PropertyExpression.cs
- XmlDesigner.cs
- CodeGroup.cs
- AssemblyBuilder.cs
- InfoCardPolicy.cs
- GridViewColumnHeader.cs
- NominalTypeEliminator.cs
- ZipIOModeEnforcingStream.cs
- WebConvert.cs
- PerformanceCounterManager.cs
- LicenseContext.cs
- OdbcCommand.cs
- RuntimeConfig.cs
- DataGrid.cs
- CfgParser.cs
- PersonalizableAttribute.cs
- entityreference_tresulttype.cs
- String.cs
- Oci.cs
- panel.cs