Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / DescriptionAttribute.cs / 1 / DescriptionAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public class DescriptionAttribute : Attribute { ///Specifies a description for a property /// or event. ////// public static readonly DescriptionAttribute Default = new DescriptionAttribute(); private string description; ///Specifies the default value for the ///, which is an /// empty string (""). This field is read-only. /// public DescriptionAttribute() : this (string.Empty) { } ///[To be supplied.] ////// public DescriptionAttribute(string description) { this.description = description; } ///Initializes a new instance of the ///class. /// public virtual string Description { get { return DescriptionValue; } } ///Gets the description stored in this attribute. ////// Read/Write property that directly modifies the string stored /// in the description attribute. The default implementation /// of the Description property simply returns this value. /// protected string DescriptionValue { get { return description; } set { description = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } DescriptionAttribute other = obj as DescriptionAttribute; return (other != null) && other.Description == Description; } public override int GetHashCode() { return Description.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public class DescriptionAttribute : Attribute { ///Specifies a description for a property /// or event. ////// public static readonly DescriptionAttribute Default = new DescriptionAttribute(); private string description; ///Specifies the default value for the ///, which is an /// empty string (""). This field is read-only. /// public DescriptionAttribute() : this (string.Empty) { } ///[To be supplied.] ////// public DescriptionAttribute(string description) { this.description = description; } ///Initializes a new instance of the ///class. /// public virtual string Description { get { return DescriptionValue; } } ///Gets the description stored in this attribute. ////// Read/Write property that directly modifies the string stored /// in the description attribute. The default implementation /// of the Description property simply returns this value. /// protected string DescriptionValue { get { return description; } set { description = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } DescriptionAttribute other = obj as DescriptionAttribute; return (other != null) && other.Description == Description; } public override int GetHashCode() { return Description.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ElementMarkupObject.cs
- WrapperEqualityComparer.cs
- StrokeFIndices.cs
- AssemblyFilter.cs
- SchemaMerger.cs
- CodeDomConfigurationHandler.cs
- CardSpaceException.cs
- DelegateHelpers.cs
- X509Certificate2.cs
- TableLayoutStyleCollection.cs
- _NTAuthentication.cs
- _LocalDataStoreMgr.cs
- ForEachAction.cs
- Debug.cs
- SqlReorderer.cs
- PointAnimation.cs
- DoubleLinkListEnumerator.cs
- DataColumnPropertyDescriptor.cs
- TreeWalkHelper.cs
- HierarchicalDataBoundControl.cs
- SQLRoleProvider.cs
- LongCountAggregationOperator.cs
- DataGridViewComboBoxEditingControl.cs
- PersonalizationEntry.cs
- _ScatterGatherBuffers.cs
- TimeIntervalCollection.cs
- Regex.cs
- UnsafeNativeMethodsCLR.cs
- Point3DCollection.cs
- SpellerInterop.cs
- ConnectionStringSettings.cs
- _SingleItemRequestCache.cs
- ControlBindingsCollection.cs
- CompatibleComparer.cs
- DataMisalignedException.cs
- InertiaTranslationBehavior.cs
- SafeProcessHandle.cs
- ToolStripButton.cs
- CodeExporter.cs
- DesignerActionPropertyItem.cs
- FolderBrowserDialog.cs
- DbConnectionPoolGroupProviderInfo.cs
- OledbConnectionStringbuilder.cs
- InvokeProviderWrapper.cs
- SqlMultiplexer.cs
- FontCollection.cs
- EditorPartCollection.cs
- DataGridColumnStyleMappingNameEditor.cs
- MsmqProcessProtocolHandler.cs
- CrossSiteScriptingValidation.cs
- WpfSharedXamlSchemaContext.cs
- EmptyControlCollection.cs
- X509Utils.cs
- ServicesUtilities.cs
- SchemaRegistration.cs
- X509ChainElement.cs
- ControlPropertyNameConverter.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SecurityElement.cs
- ClientUtils.cs
- PrivilegedConfigurationManager.cs
- DataGridViewTopLeftHeaderCell.cs
- DocComment.cs
- WorkflowDebuggerSteppingAttribute.cs
- ServiceAuthorizationBehavior.cs
- XmlILConstructAnalyzer.cs
- IndentedTextWriter.cs
- ReadOnlyActivityGlyph.cs
- AssemblyBuilderData.cs
- EmissiveMaterial.cs
- CustomWebEventKey.cs
- UnsafeNativeMethods.cs
- IdentityReference.cs
- DataExpression.cs
- WindowPatternIdentifiers.cs
- EntityStoreSchemaGenerator.cs
- KnownTypes.cs
- TimeSpanStorage.cs
- PrintControllerWithStatusDialog.cs
- Rules.cs
- PathSegment.cs
- EntityContainerRelationshipSetEnd.cs
- ThreadSafeList.cs
- ReferenceCountedObject.cs
- PersonalizationState.cs
- TdsRecordBufferSetter.cs
- CodeDOMUtility.cs
- DesignerCommandAdapter.cs
- NativeMethodsCLR.cs
- WebConfigurationFileMap.cs
- ScriptingWebServicesSectionGroup.cs
- WebReferenceCollection.cs
- SafeRegistryHandle.cs
- ApplicationTrust.cs
- TreeViewItem.cs
- VirtualPathUtility.cs
- ResXBuildProvider.cs
- ManipulationInertiaStartingEventArgs.cs
- HttpApplicationStateWrapper.cs
- TransformedBitmap.cs