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
- X509CertificateValidator.cs
- HttpHandler.cs
- MetadataAssemblyHelper.cs
- XamlInterfaces.cs
- DisposableCollectionWrapper.cs
- SqlFunctionAttribute.cs
- WebConfigurationHostFileChange.cs
- FindCriteriaElement.cs
- QilDataSource.cs
- MouseDevice.cs
- TypeToken.cs
- StringWriter.cs
- SpecialTypeDataContract.cs
- IdleTimeoutMonitor.cs
- XmlText.cs
- ColumnReorderedEventArgs.cs
- TrackBarDesigner.cs
- OuterGlowBitmapEffect.cs
- TagNameToTypeMapper.cs
- UnionExpr.cs
- JpegBitmapDecoder.cs
- Timer.cs
- DescendentsWalker.cs
- thaishape.cs
- JapaneseLunisolarCalendar.cs
- DataGridViewSelectedColumnCollection.cs
- CodeConditionStatement.cs
- ApplyImportsAction.cs
- ClientApiGenerator.cs
- EncryptedXml.cs
- UrlAuthorizationModule.cs
- UIEndRequest.cs
- MetadataPropertyAttribute.cs
- EndEvent.cs
- CollectionChangedEventManager.cs
- AccessorTable.cs
- DelegateArgumentValue.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- WebControlsSection.cs
- UIElement.cs
- PreparingEnlistment.cs
- StickyNoteContentControl.cs
- WebBrowser.cs
- InvalidCastException.cs
- isolationinterop.cs
- UpdateException.cs
- CodeDefaultValueExpression.cs
- AssemblyAttributesGoHere.cs
- DesignerResources.cs
- PageCache.cs
- Collection.cs
- OpacityConverter.cs
- XmlReflectionImporter.cs
- MailMessage.cs
- EventLogPermission.cs
- PromptStyle.cs
- Convert.cs
- Config.cs
- VectorCollection.cs
- WinInetCache.cs
- sitestring.cs
- PreProcessor.cs
- MULTI_QI.cs
- ViewStateChangedEventArgs.cs
- RegisteredScript.cs
- Maps.cs
- _BasicClient.cs
- TextSearch.cs
- TextMarkerSource.cs
- TrackBarRenderer.cs
- contentDescriptor.cs
- ThicknessAnimationBase.cs
- ScrollViewerAutomationPeer.cs
- SelectionEditingBehavior.cs
- PnrpPeerResolverBindingElement.cs
- VideoDrawing.cs
- DataObjectMethodAttribute.cs
- AlternateViewCollection.cs
- LinearKeyFrames.cs
- PathFigureCollection.cs
- ExpressionNormalizer.cs
- CompositionAdorner.cs
- SQLBinary.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- AllMembershipCondition.cs
- PathSegmentCollection.cs
- ComponentResourceManager.cs
- Compiler.cs
- SchemaNames.cs
- PlatformCulture.cs
- ComplusTypeValidator.cs
- PropertyEmitter.cs
- TableHeaderCell.cs
- CryptographicAttribute.cs
- FlowLayoutPanel.cs
- AttachmentCollection.cs
- XmlLinkedNode.cs
- CookieParameter.cs
- RelatedPropertyManager.cs
- DeferrableContentConverter.cs