Code:
/ 4.0 / 4.0 / untmp / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SizeF.cs
- CollectionView.cs
- TempFiles.cs
- XmlSequenceWriter.cs
- PackageDigitalSignature.cs
- Run.cs
- TheQuery.cs
- RuntimeCompatibilityAttribute.cs
- Hyperlink.cs
- DialogBaseForm.cs
- ConfigurationElementProperty.cs
- FirstMatchCodeGroup.cs
- WebZone.cs
- CachedFontFace.cs
- XmlReflectionImporter.cs
- SupportsEventValidationAttribute.cs
- CharUnicodeInfo.cs
- DataGridViewTopRowAccessibleObject.cs
- Transform3DGroup.cs
- OleDbDataAdapter.cs
- DbConnectionInternal.cs
- XPathNode.cs
- XmlSchemaValidator.cs
- SynchronizedDispatch.cs
- TextDpi.cs
- CollectionContainer.cs
- GraphicsPath.cs
- ImageInfo.cs
- _AutoWebProxyScriptHelper.cs
- WaveHeader.cs
- TextTreeRootNode.cs
- SettingsAttributeDictionary.cs
- BuildDependencySet.cs
- ContextInformation.cs
- ToolStripDropDownMenu.cs
- DataKey.cs
- _ShellExpression.cs
- ISessionStateStore.cs
- FacetDescription.cs
- HttpInputStream.cs
- ReflectionUtil.cs
- TextRangeEditTables.cs
- ClickablePoint.cs
- HandledMouseEvent.cs
- CalendarButton.cs
- DPTypeDescriptorContext.cs
- XmlCharCheckingWriter.cs
- ExtendedTransformFactory.cs
- ArgIterator.cs
- ActivityDesignerHelper.cs
- HtmlInputCheckBox.cs
- CustomErrorCollection.cs
- SystemThemeKey.cs
- _RequestCacheProtocol.cs
- BaseTemplateParser.cs
- CustomCredentialPolicy.cs
- ObjectDisposedException.cs
- TreeBuilderXamlTranslator.cs
- ReadOnlyKeyedCollection.cs
- SmiEventSink.cs
- HtmlEncodedRawTextWriter.cs
- XsltArgumentList.cs
- PathBox.cs
- DetailsViewDeletedEventArgs.cs
- UInt16Converter.cs
- MarkupCompiler.cs
- OSFeature.cs
- ValueTypeIndexerReference.cs
- SecurityRuntime.cs
- AspNetSynchronizationContext.cs
- Function.cs
- HtmlTernaryTree.cs
- CommonDialog.cs
- TextContainerChangedEventArgs.cs
- SqlCacheDependencyDatabase.cs
- OdbcEnvironmentHandle.cs
- InstanceOwnerException.cs
- Socket.cs
- RotateTransform.cs
- InstanceNameConverter.cs
- WorkflowTimerService.cs
- PathSegment.cs
- WebEventTraceProvider.cs
- TextSchema.cs
- Random.cs
- JsonGlobals.cs
- WebPartMenu.cs
- TextAnchor.cs
- DetailsViewUpdateEventArgs.cs
- TCPClient.cs
- InvokeMemberBinder.cs
- MergeLocalizationDirectives.cs
- AttributeProviderAttribute.cs
- RenameRuleObjectDialog.cs
- HttpChannelHelpers.cs
- AnnotationResourceCollection.cs
- CriticalFinalizerObject.cs
- cryptoapiTransform.cs
- BevelBitmapEffect.cs
- RtType.cs