Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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)); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlDictionary.cs
- UrlAuthFailedErrorFormatter.cs
- PictureBox.cs
- SecurityUtils.cs
- DataReceivedEventArgs.cs
- StaticSiteMapProvider.cs
- InkPresenterAutomationPeer.cs
- EntityTypeEmitter.cs
- ColorTranslator.cs
- InkCanvasFeedbackAdorner.cs
- VectorCollection.cs
- ImportException.cs
- DataTransferEventArgs.cs
- DataGridViewCellParsingEventArgs.cs
- WorkflowViewManager.cs
- KeyFrames.cs
- InternalPermissions.cs
- backend.cs
- ButtonBaseAutomationPeer.cs
- XamlNamespaceHelper.cs
- MessageBox.cs
- DataGridViewCellStateChangedEventArgs.cs
- QuaternionAnimation.cs
- XamlSerializerUtil.cs
- SQLCharsStorage.cs
- ProtocolsSection.cs
- ProvideValueServiceProvider.cs
- ElapsedEventArgs.cs
- TextServicesCompartmentEventSink.cs
- StrongName.cs
- TreeWalker.cs
- Int64AnimationUsingKeyFrames.cs
- FormViewUpdateEventArgs.cs
- Mouse.cs
- XsdDuration.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- RemotingAttributes.cs
- WebCategoryAttribute.cs
- Translator.cs
- AutoResizedEvent.cs
- SymbolUsageManager.cs
- XmlSchemaImport.cs
- MarkupCompilePass1.cs
- SecureStringHasher.cs
- ProcessHost.cs
- BreakRecordTable.cs
- CodeTypeParameterCollection.cs
- SByteStorage.cs
- PropertyDescriptorComparer.cs
- CodeComment.cs
- RulePatternOps.cs
- XPathConvert.cs
- CodeArrayIndexerExpression.cs
- ToolStripDropDownItem.cs
- mediaeventargs.cs
- ResourceDisplayNameAttribute.cs
- Main.cs
- SingleQueryOperator.cs
- RtfNavigator.cs
- InkCanvasAutomationPeer.cs
- ECDsa.cs
- ListItemConverter.cs
- SparseMemoryStream.cs
- MdiWindowListStrip.cs
- TextTreeRootNode.cs
- UpdateExpressionVisitor.cs
- InputScopeNameConverter.cs
- Type.cs
- ColorAnimation.cs
- Control.cs
- SmtpAuthenticationManager.cs
- ImageMetadata.cs
- CurrentChangedEventManager.cs
- AQNBuilder.cs
- PeerEndPoint.cs
- ConfigurationConverterBase.cs
- BitmapEffectGroup.cs
- SapiGrammar.cs
- WorkflowServiceBehavior.cs
- DragDrop.cs
- glyphs.cs
- DropSource.cs
- LocalizabilityAttribute.cs
- BatchStream.cs
- KoreanCalendar.cs
- Label.cs
- hebrewshape.cs
- CmsUtils.cs
- Brush.cs
- ThreadAbortException.cs
- TableLayoutPanelCellPosition.cs
- XmlSchemaSimpleTypeRestriction.cs
- ProfileInfo.cs
- PropertyDescriptorGridEntry.cs
- Set.cs
- ReceiveCompletedEventArgs.cs
- HashRepartitionStream.cs
- ServiceProviders.cs
- ButtonChrome.cs
- ConnectivityStatus.cs