Code:
/ 4.0 / 4.0 / 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. /// ///// 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
- FilteredDataSetHelper.cs
- PhysicalFontFamily.cs
- BasicBrowserDialog.designer.cs
- ObjectStateFormatter.cs
- ReadOnlyCollection.cs
- DispatcherExceptionFilterEventArgs.cs
- SslSecurityTokenParameters.cs
- FacetValueContainer.cs
- Int32Converter.cs
- GuidTagList.cs
- DesignerMetadata.cs
- Stopwatch.cs
- BezierSegment.cs
- ConfigXmlWhitespace.cs
- ServicePointManagerElement.cs
- _NTAuthentication.cs
- CreateUserErrorEventArgs.cs
- ReflectionHelper.cs
- __ConsoleStream.cs
- NumberFunctions.cs
- InvalidFilterCriteriaException.cs
- KeyedHashAlgorithm.cs
- ToggleProviderWrapper.cs
- ArrayConverter.cs
- DataGridViewCellPaintingEventArgs.cs
- ImageListUtils.cs
- XmlSchemaSimpleContent.cs
- ListViewSelectEventArgs.cs
- Privilege.cs
- DiscreteKeyFrames.cs
- Exceptions.cs
- DeclaredTypeElementCollection.cs
- BaseUriHelper.cs
- XmlParserContext.cs
- SamlAuthorityBinding.cs
- InputQueue.cs
- DockPanel.cs
- WebPartTransformer.cs
- DataGridParentRows.cs
- MdiWindowListItemConverter.cs
- SchemaHelper.cs
- HostedImpersonationContext.cs
- Int64AnimationUsingKeyFrames.cs
- MasterPageParser.cs
- XmlSchemaComplexContent.cs
- ExtendedPropertyInfo.cs
- HideDisabledControlAdapter.cs
- SectionRecord.cs
- NullableFloatSumAggregationOperator.cs
- ActivityScheduledQuery.cs
- Symbol.cs
- RegisteredDisposeScript.cs
- MsmqIntegrationBindingElement.cs
- XmlAnyElementAttribute.cs
- OrderingExpression.cs
- Missing.cs
- HttpStreamMessage.cs
- SelectionPattern.cs
- TrackBar.cs
- LogWriteRestartAreaAsyncResult.cs
- MethodRental.cs
- XmlQueryContext.cs
- HtmlImageAdapter.cs
- ExportOptions.cs
- KoreanCalendar.cs
- HtmlControlPersistable.cs
- BoundField.cs
- CompoundFileDeflateTransform.cs
- StackSpiller.Bindings.cs
- Queue.cs
- InputMethodStateTypeInfo.cs
- GridViewCancelEditEventArgs.cs
- FrameworkElement.cs
- DriveInfo.cs
- MapPathBasedVirtualPathProvider.cs
- RangeValueProviderWrapper.cs
- Style.cs
- PerfCounterSection.cs
- RouteTable.cs
- VisualStateGroup.cs
- BaseCAMarshaler.cs
- Int64.cs
- BrowserCapabilitiesCompiler.cs
- BufferedMessageWriter.cs
- WebSysDescriptionAttribute.cs
- ShaderEffect.cs
- KernelTypeValidation.cs
- XmlRootAttribute.cs
- SecurityContextTokenValidationException.cs
- InputScopeNameConverter.cs
- InstanceHandleConflictException.cs
- DatatypeImplementation.cs
- NonSerializedAttribute.cs
- ResourceKey.cs
- BuilderInfo.cs
- Drawing.cs
- IntPtr.cs
- IpcManager.cs
- ScopeElementCollection.cs
- CookielessHelper.cs