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
- SafeNativeMethodsCLR.cs
- ControlAdapter.cs
- SqlRowUpdatedEvent.cs
- DataPagerFieldCommandEventArgs.cs
- PackagingUtilities.cs
- ToolStripSeparatorRenderEventArgs.cs
- GenericWebPart.cs
- EFTableProvider.cs
- FtpWebResponse.cs
- RuleSettings.cs
- WorkflowMarkupSerializerMapping.cs
- CfgParser.cs
- MetafileEditor.cs
- WindowsScrollBarBits.cs
- DirectionalLight.cs
- CloseSequenceResponse.cs
- DataControlButton.cs
- ReadOnlyNameValueCollection.cs
- SiteMapPath.cs
- DigestTraceRecordHelper.cs
- CheckBoxStandardAdapter.cs
- InstallerTypeAttribute.cs
- ObjectDataSource.cs
- MatrixTransform3D.cs
- FrameworkContentElement.cs
- RoleServiceManager.cs
- StatusBarDrawItemEvent.cs
- LOSFormatter.cs
- SignedXml.cs
- ArgumentException.cs
- TransformBlockRequest.cs
- XsltArgumentList.cs
- DataGridViewCellMouseEventArgs.cs
- ObjectManager.cs
- StructuredCompositeActivityDesigner.cs
- HwndHost.cs
- XPathBuilder.cs
- IDictionary.cs
- BevelBitmapEffect.cs
- RNGCryptoServiceProvider.cs
- DoubleAnimationUsingPath.cs
- DataRecordInfo.cs
- ToolStripPanelSelectionGlyph.cs
- Util.cs
- SqlClientPermission.cs
- basecomparevalidator.cs
- Message.cs
- ReflectTypeDescriptionProvider.cs
- DateTimeUtil.cs
- SafeProcessHandle.cs
- Calendar.cs
- XamlDesignerSerializationManager.cs
- DesignConnection.cs
- WebPartCatalogCloseVerb.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- XmlDataSourceNodeDescriptor.cs
- MimeReflector.cs
- BitmapImage.cs
- ScopeCollection.cs
- VisualBasicSettingsHandler.cs
- ExpressionReplacer.cs
- OperationCanceledException.cs
- cache.cs
- ToolboxCategory.cs
- QueryableFilterUserControl.cs
- ObjectSpanRewriter.cs
- SelectionPattern.cs
- WebPartUserCapability.cs
- SimpleType.cs
- BatchWriter.cs
- Util.cs
- ACE.cs
- SignatureDescription.cs
- Popup.cs
- AssertFilter.cs
- NegatedCellConstant.cs
- EasingKeyFrames.cs
- ReadOnlyPermissionSet.cs
- configsystem.cs
- DateTimeConstantAttribute.cs
- CorrelationExtension.cs
- HttpResponse.cs
- RelationshipEntry.cs
- TriggerActionCollection.cs
- EntityModelBuildProvider.cs
- EntityCommand.cs
- CacheMode.cs
- GridItem.cs
- DataGridViewLinkCell.cs
- IgnoreFlushAndCloseStream.cs
- ElementInit.cs
- SafeNativeMethods.cs
- WebPartMenu.cs
- DetailsViewPageEventArgs.cs
- ToolStripSplitButton.cs
- errorpatternmatcher.cs
- ReadOnlyDictionary.cs
- ProxySimple.cs
- StickyNoteAnnotations.cs
- ProfileSection.cs