Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }/// Determines if this attribute is the default. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FlowDocumentView.cs
- RelationshipDetailsRow.cs
- COM2IDispatchConverter.cs
- LinkedResourceCollection.cs
- EntityModelSchemaGenerator.cs
- XmlWriter.cs
- ProgressBar.cs
- MonthChangedEventArgs.cs
- ProcessInputEventArgs.cs
- WindowsMenu.cs
- CommonRemoteMemoryBlock.cs
- StateManagedCollection.cs
- XmlToDatasetMap.cs
- SafeCryptoHandles.cs
- SpellerStatusTable.cs
- Image.cs
- WinEventTracker.cs
- BindingElementExtensionElement.cs
- Permission.cs
- RequestValidator.cs
- NavigateEvent.cs
- DecodeHelper.cs
- Baml2006Reader.cs
- MenuItemBindingCollection.cs
- AttributeSetAction.cs
- ViewSimplifier.cs
- CmsUtils.cs
- ZeroOpNode.cs
- IIS7WorkerRequest.cs
- GridViewDeleteEventArgs.cs
- ByteKeyFrameCollection.cs
- SignatureConfirmations.cs
- EnumType.cs
- CommandBindingCollection.cs
- RtfFormatStack.cs
- SafeReadContext.cs
- WebPartAuthorizationEventArgs.cs
- FileSystemEventArgs.cs
- Variant.cs
- TextEffect.cs
- MatrixTransform.cs
- HttpModule.cs
- TokenBasedSetEnumerator.cs
- XsltException.cs
- SelfIssuedAuthRSACryptoProvider.cs
- DBNull.cs
- HttpPostClientProtocol.cs
- OutOfProcStateClientManager.cs
- Exception.cs
- Color.cs
- MDIWindowDialog.cs
- StylusButton.cs
- DesignerDataTableBase.cs
- DashStyles.cs
- GatewayIPAddressInformationCollection.cs
- AssemblyHash.cs
- GroupQuery.cs
- PopupEventArgs.cs
- CommandManager.cs
- SerializationTrace.cs
- PowerStatus.cs
- DataRelationPropertyDescriptor.cs
- UInt64Converter.cs
- TreeNodeBindingDepthConverter.cs
- exports.cs
- SineEase.cs
- XMLUtil.cs
- TraceUtility.cs
- DbReferenceCollection.cs
- DbConnectionPool.cs
- PageAsyncTaskManager.cs
- InvalidCommandTreeException.cs
- PriorityRange.cs
- METAHEADER.cs
- ProxyWebPart.cs
- DayRenderEvent.cs
- XmlSecureResolver.cs
- GridViewPageEventArgs.cs
- HostingEnvironmentException.cs
- StylusPlugin.cs
- PageParserFilter.cs
- TextSchema.cs
- PeerTransportSecurityElement.cs
- SortFieldComparer.cs
- DbProviderManifest.cs
- PassportAuthenticationModule.cs
- DesignTimeParseData.cs
- ThemeableAttribute.cs
- Pen.cs
- ADMembershipProvider.cs
- QuadraticBezierSegment.cs
- TraceContext.cs
- Switch.cs
- FieldAccessException.cs
- RMEnrollmentPage1.cs
- BasicExpressionVisitor.cs
- DataGridViewRowsRemovedEventArgs.cs
- ObjectStateManager.cs
- GraphicsPathIterator.cs
- DataFormat.cs