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
- SoapInteropTypes.cs
- ContainerParaClient.cs
- LogAppendAsyncResult.cs
- BinarySerializer.cs
- XmlSchemaValidator.cs
- MultilineStringConverter.cs
- PropertyRecord.cs
- DataGridTableCollection.cs
- SatelliteContractVersionAttribute.cs
- ToolZone.cs
- ParameterElement.cs
- RowToParametersTransformer.cs
- AssertSection.cs
- HandleCollector.cs
- CurrentChangingEventManager.cs
- Int16Converter.cs
- SqlBuffer.cs
- XmlTypeMapping.cs
- ProjectionPruner.cs
- TextElementCollectionHelper.cs
- XmlQueryStaticData.cs
- ContainerControl.cs
- EdmEntityTypeAttribute.cs
- HTTPNotFoundHandler.cs
- ByteBufferPool.cs
- WebPartManagerDesigner.cs
- GB18030Encoding.cs
- _SSPISessionCache.cs
- DesignerTextViewAdapter.cs
- TemplateControlCodeDomTreeGenerator.cs
- RepeaterItemEventArgs.cs
- SystemIPv4InterfaceProperties.cs
- TaskForm.cs
- ConfigPathUtility.cs
- HScrollProperties.cs
- IndicShape.cs
- ServiceSecurityContext.cs
- DbDataSourceEnumerator.cs
- PageSetupDialog.cs
- FormatConvertedBitmap.cs
- IItemContainerGenerator.cs
- Constraint.cs
- LogWriteRestartAreaAsyncResult.cs
- CallbackTimeoutsElement.cs
- DefinitionBase.cs
- LocalBuilder.cs
- CacheMemory.cs
- FileNotFoundException.cs
- StrokeNodeOperations2.cs
- X509Certificate2.cs
- XMLUtil.cs
- DbInsertCommandTree.cs
- ScrollProviderWrapper.cs
- WeakEventTable.cs
- UnrecognizedPolicyAssertionElement.cs
- DataGridViewRowHeaderCell.cs
- InteropBitmapSource.cs
- OleDbInfoMessageEvent.cs
- OdbcConnectionPoolProviderInfo.cs
- ServiceThrottlingBehavior.cs
- JournalEntry.cs
- ValueUtilsSmi.cs
- RuntimeEnvironment.cs
- AddressingProperty.cs
- WebHttpBinding.cs
- DataObject.cs
- DataControlFieldHeaderCell.cs
- DataTemplateSelector.cs
- CustomAttributeBuilder.cs
- RemoteWebConfigurationHostStream.cs
- PrefixHandle.cs
- DataServiceRequest.cs
- MimePart.cs
- ProxyFragment.cs
- ToolStripOverflow.cs
- DesignerActionPanel.cs
- OracleNumber.cs
- HtmlHead.cs
- CanExecuteRoutedEventArgs.cs
- DockPatternIdentifiers.cs
- DBSqlParserColumnCollection.cs
- PolicyStatement.cs
- TextTreePropertyUndoUnit.cs
- XmlComment.cs
- ProfessionalColorTable.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- RecognizeCompletedEventArgs.cs
- CodeTypeReferenceExpression.cs
- RC2.cs
- AudioLevelUpdatedEventArgs.cs
- RolePrincipal.cs
- StringCollection.cs
- WebPart.cs
- ExceptionCollection.cs
- DataGridViewCellCollection.cs
- cookiecollection.cs
- AdapterUtil.cs
- HostingPreferredMapPath.cs
- TcpTransportBindingElement.cs
- X500Name.cs