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
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ConfigurationStrings.cs
- Crc32Helper.cs
- OdbcRowUpdatingEvent.cs
- XsltQilFactory.cs
- Section.cs
- ToolStripPanelRenderEventArgs.cs
- SineEase.cs
- PriorityRange.cs
- BigIntegerStorage.cs
- DataGrid.cs
- SystemIPInterfaceStatistics.cs
- TableLayout.cs
- BitArray.cs
- CommandManager.cs
- PathSegmentCollection.cs
- EntityDataSourceUtil.cs
- CopyOnWriteList.cs
- SelectionEditingBehavior.cs
- ReadOnlyState.cs
- ProgramPublisher.cs
- HtmlInputButton.cs
- HitTestParameters3D.cs
- Range.cs
- SuppressIldasmAttribute.cs
- LinqToSqlWrapper.cs
- AdornerDecorator.cs
- LoginView.cs
- Parser.cs
- InternalEnumValidator.cs
- HierarchicalDataSourceIDConverter.cs
- ImageUrlEditor.cs
- XmlDataLoader.cs
- AlignmentYValidation.cs
- UInt64Converter.cs
- PageParser.cs
- ListBox.cs
- DetailsViewInsertedEventArgs.cs
- LabelAutomationPeer.cs
- HtmlInputText.cs
- SourceItem.cs
- SwitchElementsCollection.cs
- AssemblyName.cs
- SecurityTokenProviderContainer.cs
- LogExtent.cs
- BooleanProjectedSlot.cs
- TabRenderer.cs
- FreezableOperations.cs
- TypeElement.cs
- SqlMultiplexer.cs
- XmlILModule.cs
- nulltextnavigator.cs
- SafeFileMapViewHandle.cs
- Task.cs
- RoleService.cs
- TextFormatterImp.cs
- SamlAuthorizationDecisionClaimResource.cs
- Encoder.cs
- MarshalDirectiveException.cs
- DataStreamFromComStream.cs
- SpeakProgressEventArgs.cs
- TraceHandlerErrorFormatter.cs
- AbstractSvcMapFileLoader.cs
- DateTimeValueSerializerContext.cs
- ObjectRef.cs
- OdbcFactory.cs
- DataKeyArray.cs
- CompositeFontFamily.cs
- DataGridViewAccessibleObject.cs
- FlowLayout.cs
- XomlSerializationHelpers.cs
- PackUriHelper.cs
- BufferedConnection.cs
- PropertiesTab.cs
- SchemaNames.cs
- XmlElement.cs
- MethodCallTranslator.cs
- SqlWriter.cs
- CodeMethodInvokeExpression.cs
- RequestDescription.cs
- GridViewItemAutomationPeer.cs
- DragEvent.cs
- ConfigurationManagerHelperFactory.cs
- _NegoState.cs
- BinaryParser.cs
- KeyboardNavigation.cs
- ReliableOutputConnection.cs
- TypedServiceOperationListItem.cs
- StrongNameUtility.cs
- XmlWriterSettings.cs
- TraversalRequest.cs
- EntityContainer.cs
- DuplicateWaitObjectException.cs
- StrongNamePublicKeyBlob.cs
- MailAddressCollection.cs
- TextRangeAdaptor.cs
- GregorianCalendar.cs
- SizeKeyFrameCollection.cs
- Light.cs
- FlowNode.cs