Code:
/ FX-1434 / FX-1434 / 1.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
- SharedPersonalizationStateInfo.cs
- NameObjectCollectionBase.cs
- QueueAccessMode.cs
- Events.cs
- UserControl.cs
- TextServicesProperty.cs
- RandomNumberGenerator.cs
- RadioButtonFlatAdapter.cs
- SpeechSeg.cs
- ThicknessAnimationUsingKeyFrames.cs
- IfJoinedCondition.cs
- ProfileService.cs
- CLRBindingWorker.cs
- ConfigurationManager.cs
- MessageOperationFormatter.cs
- CallTemplateAction.cs
- SizeChangedEventArgs.cs
- CalendarDesigner.cs
- NavigationFailedEventArgs.cs
- DocumentPaginator.cs
- SmiEventSink_DeferedProcessing.cs
- BitmapEditor.cs
- ByteAnimationBase.cs
- StatusBarPanelClickEvent.cs
- ExtensionSimplifierMarkupObject.cs
- SignatureDescription.cs
- objectresult_tresulttype.cs
- WebPartConnectionsCloseVerb.cs
- TextRunProperties.cs
- WebPartConnectionsCloseVerb.cs
- DataGridCheckBoxColumn.cs
- UnionCodeGroup.cs
- ReflectionUtil.cs
- FlowDocumentPage.cs
- EndPoint.cs
- RadioButtonStandardAdapter.cs
- DBConnectionString.cs
- WindowsSecurityToken.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- TextLine.cs
- DataGridViewComboBoxColumn.cs
- MembershipSection.cs
- TraceRecord.cs
- ScriptResourceDefinition.cs
- Point3DAnimationUsingKeyFrames.cs
- Viewport3DAutomationPeer.cs
- DesignBindingConverter.cs
- SearchForVirtualItemEventArgs.cs
- Types.cs
- ArrayListCollectionBase.cs
- ToolStripContentPanel.cs
- CornerRadius.cs
- DisplayNameAttribute.cs
- UrlMapping.cs
- XmlIncludeAttribute.cs
- ByteStreamMessageEncoderFactory.cs
- TemplateControlParser.cs
- DoubleUtil.cs
- HtmlInputPassword.cs
- SqlFactory.cs
- SqlCacheDependencyDatabase.cs
- ClonableStack.cs
- BamlResourceContent.cs
- DependencyObjectProvider.cs
- SequenceNumber.cs
- Regex.cs
- XamlTemplateSerializer.cs
- MultipleCopiesCollection.cs
- Model3DCollection.cs
- FlagsAttribute.cs
- UInt32Converter.cs
- TableCell.cs
- QueryOutputWriter.cs
- MexServiceChannelBuilder.cs
- RootProfilePropertySettingsCollection.cs
- PropertyFilterAttribute.cs
- PagedControl.cs
- CrossContextChannel.cs
- PointAnimation.cs
- SafeMarshalContext.cs
- CurrentChangingEventManager.cs
- CollectionType.cs
- StreamWithDictionary.cs
- DataGridViewCellParsingEventArgs.cs
- JournalEntryStack.cs
- TextLine.cs
- AsymmetricSignatureFormatter.cs
- ClientSideQueueItem.cs
- UserControlCodeDomTreeGenerator.cs
- RequestedSignatureDialog.cs
- AssociationTypeEmitter.cs
- ListBindingConverter.cs
- DataGridDetailsPresenterAutomationPeer.cs
- counter.cs
- ColumnHeader.cs
- SQLInt16Storage.cs
- PackagingUtilities.cs
- PostBackTrigger.cs
- IndentedWriter.cs
- SiteMapDataSourceDesigner.cs