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
- SQLInt32Storage.cs
- SubMenuStyle.cs
- RegexTree.cs
- Compilation.cs
- PixelShader.cs
- ToolStripContainer.cs
- SubstitutionDesigner.cs
- DataRowCollection.cs
- ClientTarget.cs
- ScrollEvent.cs
- ObservableCollection.cs
- MouseGestureValueSerializer.cs
- LinearQuaternionKeyFrame.cs
- AttributeQuery.cs
- SqlRowUpdatedEvent.cs
- MachineKeyConverter.cs
- SQLUtility.cs
- NoClickablePointException.cs
- XmlDocumentViewSchema.cs
- Point4D.cs
- WebPartHeaderCloseVerb.cs
- TabItem.cs
- TypeConverterMarkupExtension.cs
- TextTreeNode.cs
- IDReferencePropertyAttribute.cs
- NameObjectCollectionBase.cs
- DataMember.cs
- WbmpConverter.cs
- SubMenuStyle.cs
- __TransparentProxy.cs
- graph.cs
- SQLDecimal.cs
- SettingsBase.cs
- ImageClickEventArgs.cs
- TextPointerBase.cs
- Debug.cs
- SocketInformation.cs
- ProfilePropertyNameValidator.cs
- OutOfMemoryException.cs
- ClientTargetCollection.cs
- JournalEntryListConverter.cs
- GlyphRunDrawing.cs
- Component.cs
- _AcceptOverlappedAsyncResult.cs
- CurrencyWrapper.cs
- SoapSchemaImporter.cs
- FilteredAttributeCollection.cs
- GridViewPageEventArgs.cs
- SmiSettersStream.cs
- QilLiteral.cs
- XmlSchemaComplexContentRestriction.cs
- Bits.cs
- SuppressIldasmAttribute.cs
- RSAOAEPKeyExchangeFormatter.cs
- AssemblyAssociatedContentFileAttribute.cs
- MetadataStore.cs
- RecognizerBase.cs
- TextParagraphView.cs
- BaseHashHelper.cs
- Int32Storage.cs
- RegexParser.cs
- TextEffectResolver.cs
- DLinqDataModelProvider.cs
- ArrayItemReference.cs
- DashStyle.cs
- FixedPageAutomationPeer.cs
- GridViewRowPresenterBase.cs
- RequestCacheManager.cs
- ColumnHeader.cs
- ChannelPool.cs
- CompositeTypefaceMetrics.cs
- OleDbConnectionFactory.cs
- ByteConverter.cs
- XmlTypeMapping.cs
- ArcSegment.cs
- TypeUsageBuilder.cs
- LayoutEngine.cs
- Point4DValueSerializer.cs
- Point.cs
- WebBrowserNavigatedEventHandler.cs
- ListViewItemCollectionEditor.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- TextDecoration.cs
- XmlILStorageConverter.cs
- XmlWhitespace.cs
- AutomationPatternInfo.cs
- Rect.cs
- QilInvokeLateBound.cs
- PageThemeParser.cs
- CreatingCookieEventArgs.cs
- Literal.cs
- FormClosingEvent.cs
- DataGridViewRowStateChangedEventArgs.cs
- Renderer.cs
- LinqDataSourceDeleteEventArgs.cs
- AsyncOperationManager.cs
- SQLGuid.cs
- Line.cs
- ICspAsymmetricAlgorithm.cs
- Constant.cs