Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ReadOnlyAttribute.cs / 1305376 / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Determines if this attribute is the default. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Separator.cs
- UnsettableComboBox.cs
- SamlAuthorizationDecisionClaimResource.cs
- safelinkcollection.cs
- SQLDateTime.cs
- IconBitmapDecoder.cs
- filewebrequest.cs
- SmtpDigestAuthenticationModule.cs
- XmlSchemaSubstitutionGroup.cs
- TextElementCollectionHelper.cs
- XmlByteStreamWriter.cs
- cookiecontainer.cs
- ScriptReferenceEventArgs.cs
- AttributeXamlType.cs
- FastPropertyAccessor.cs
- StyleBamlTreeBuilder.cs
- XamlSerializationHelper.cs
- ContentAlignmentEditor.cs
- NullRuntimeConfig.cs
- ToolboxItemFilterAttribute.cs
- DataTableNewRowEvent.cs
- SemanticBasicElement.cs
- EncryptedData.cs
- NameTable.cs
- FormCollection.cs
- ActivationArguments.cs
- PropertyGridCommands.cs
- HTMLTagNameToTypeMapper.cs
- ObjectSpanRewriter.cs
- MdImport.cs
- CultureMapper.cs
- CheckBoxPopupAdapter.cs
- RadioButtonBaseAdapter.cs
- WindowsListBox.cs
- _AuthenticationState.cs
- PageAsyncTask.cs
- HashMembershipCondition.cs
- TextFormatter.cs
- DispatcherProcessingDisabled.cs
- HealthMonitoringSection.cs
- TextElementCollectionHelper.cs
- SimpleLine.cs
- DateTimePicker.cs
- GenerateTemporaryTargetAssembly.cs
- ThumbButtonInfoCollection.cs
- LowerCaseStringConverter.cs
- ListViewGroup.cs
- propertyentry.cs
- SqlCacheDependencyDatabase.cs
- SecurityRuntime.cs
- TreeNode.cs
- ComponentEditorForm.cs
- GradientStop.cs
- Error.cs
- InvokeFunc.cs
- MessagePropertyVariants.cs
- WebControlParameterProxy.cs
- ParameterToken.cs
- DataGridViewRow.cs
- ILGenerator.cs
- DbConnectionFactory.cs
- uribuilder.cs
- Bookmark.cs
- StrokeNodeData.cs
- MessageSecurityException.cs
- PointHitTestResult.cs
- StylusPlugInCollection.cs
- CompilerInfo.cs
- TextSegment.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- DatatypeImplementation.cs
- Parser.cs
- SqlExpressionNullability.cs
- BufferedReadStream.cs
- SessionStateUtil.cs
- ipaddressinformationcollection.cs
- DesignerTransaction.cs
- MobileControlBuilder.cs
- ResourceAttributes.cs
- ProviderConnectionPointCollection.cs
- OneOfElement.cs
- CellTreeSimplifier.cs
- VideoDrawing.cs
- _HeaderInfoTable.cs
- StrongName.cs
- BindingExpressionBase.cs
- SafeLocalMemHandle.cs
- tibetanshape.cs
- StreamGeometry.cs
- GeneralTransform3DGroup.cs
- XmlSchemaElement.cs
- ClickablePoint.cs
- Stack.cs
- PropertyDescriptors.cs
- ResourcesBuildProvider.cs
- XpsSerializationManager.cs
- XmlRootAttribute.cs
- TreeViewImageIndexConverter.cs
- GridViewCancelEditEventArgs.cs
- CompileLiteralTextParser.cs