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
- DrawingContextDrawingContextWalker.cs
- AdPostCacheSubstitution.cs
- SoapRpcServiceAttribute.cs
- Condition.cs
- WorkflowServiceHostFactory.cs
- WebServiceMethodData.cs
- Selection.cs
- FileChangesMonitor.cs
- TypeDependencyAttribute.cs
- XmlKeywords.cs
- DeobfuscatingStream.cs
- XmlSchemaProviderAttribute.cs
- OracleRowUpdatingEventArgs.cs
- DataGridViewDesigner.cs
- CacheMemory.cs
- TemplateParser.cs
- DocumentXmlWriter.cs
- ComponentCodeDomSerializer.cs
- KeyValuePair.cs
- ArraySortHelper.cs
- EffectiveValueEntry.cs
- SmiMetaData.cs
- CryptoApi.cs
- DataBinder.cs
- TextSpanModifier.cs
- CodeSnippetExpression.cs
- CodeTypeParameterCollection.cs
- SymbolEqualComparer.cs
- AuthenticateEventArgs.cs
- PostBackTrigger.cs
- XmlIlTypeHelper.cs
- TextSyndicationContent.cs
- BuildProviderCollection.cs
- InputLangChangeEvent.cs
- WebDisplayNameAttribute.cs
- ExpressionVisitor.cs
- MenuItemAutomationPeer.cs
- AdapterUtil.cs
- Msec.cs
- HatchBrush.cs
- Context.cs
- ThrowOnMultipleAssignment.cs
- CategoryValueConverter.cs
- Classification.cs
- ToolStripItemClickedEventArgs.cs
- DataRelationPropertyDescriptor.cs
- QueueProcessor.cs
- SourceExpressionException.cs
- DataConnectionHelper.cs
- NumericUpDownAccelerationCollection.cs
- NameObjectCollectionBase.cs
- HasActivatableWorkflowEvent.cs
- QilCloneVisitor.cs
- Freezable.cs
- ReflectPropertyDescriptor.cs
- QueryContext.cs
- DbConnectionPoolIdentity.cs
- ResXResourceSet.cs
- SerializationAttributes.cs
- FileUtil.cs
- XPathDocumentBuilder.cs
- XMLSyntaxException.cs
- OracleInternalConnection.cs
- MessageEventSubscriptionService.cs
- CodeIdentifiers.cs
- IncrementalCompileAnalyzer.cs
- _RegBlobWebProxyDataBuilder.cs
- WebControlAdapter.cs
- StringValueConverter.cs
- AssemblyGen.cs
- Exceptions.cs
- SmtpDigestAuthenticationModule.cs
- XmlDocumentSchema.cs
- ObjectListCommand.cs
- DecoderBestFitFallback.cs
- RadioButtonPopupAdapter.cs
- WebControlToolBoxItem.cs
- EnumValAlphaComparer.cs
- ClientOperation.cs
- AssertHelper.cs
- ByteStreamMessageEncoderFactory.cs
- BufferedWebEventProvider.cs
- DataFormats.cs
- SettingsPropertyValueCollection.cs
- TagPrefixAttribute.cs
- DefaultValueTypeConverter.cs
- CryptoConfig.cs
- PTConverter.cs
- XamlInterfaces.cs
- RemoteDebugger.cs
- CheckBoxRenderer.cs
- DiagnosticTrace.cs
- DurableErrorHandler.cs
- UIElement.cs
- EntitySetBaseCollection.cs
- RectangleHotSpot.cs
- ProviderIncompatibleException.cs
- MonthChangedEventArgs.cs
- CustomPopupPlacement.cs
- BrowserCapabilitiesCodeGenerator.cs