Code:
/ DotNET / DotNET / 8.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
- ImageListStreamer.cs
- TargetConverter.cs
- SectionVisual.cs
- XmlElementCollection.cs
- DescendentsWalkerBase.cs
- InputLangChangeEvent.cs
- DependencyPropertyAttribute.cs
- RangeValuePatternIdentifiers.cs
- MsmqHostedTransportManager.cs
- IndentTextWriter.cs
- DbUpdateCommandTree.cs
- BroadcastEventHelper.cs
- KeyValueInternalCollection.cs
- PeerToPeerException.cs
- DataReaderContainer.cs
- GenericsInstances.cs
- StorageAssociationSetMapping.cs
- DashStyle.cs
- TableRowsCollectionEditor.cs
- MeasureData.cs
- SafeEventHandle.cs
- ScrollChrome.cs
- LinearGradientBrush.cs
- ResourceContainerWrapper.cs
- XmlSchemaInfo.cs
- StringInfo.cs
- MILUtilities.cs
- MenuItemStyle.cs
- FolderBrowserDialog.cs
- RemoteWebConfigurationHostStream.cs
- SerializationHelper.cs
- FacetDescriptionElement.cs
- FrameworkElement.cs
- ClickablePoint.cs
- SyncMethodInvoker.cs
- ProcessingInstructionAction.cs
- InputScope.cs
- FixedMaxHeap.cs
- RenamedEventArgs.cs
- TimerElapsedEvenArgs.cs
- ByteConverter.cs
- ThreadExceptionDialog.cs
- XmlSchemaAttributeGroupRef.cs
- ConsoleCancelEventArgs.cs
- WinCategoryAttribute.cs
- Token.cs
- AnimationException.cs
- ParallelForEach.cs
- Vector3dCollection.cs
- FrugalMap.cs
- Int16Storage.cs
- SystemIPInterfaceStatistics.cs
- ProxyWebPartConnectionCollection.cs
- PnrpPermission.cs
- TextHidden.cs
- ColorMatrix.cs
- hwndwrapper.cs
- Set.cs
- WebPartAuthorizationEventArgs.cs
- AbsoluteQuery.cs
- ManagedFilter.cs
- Context.cs
- SafeNativeMethods.cs
- SystemDropShadowChrome.cs
- PolyBezierSegmentFigureLogic.cs
- RowToParametersTransformer.cs
- DispatchWrapper.cs
- TcpClientChannel.cs
- Underline.cs
- TempFiles.cs
- UnknownBitmapEncoder.cs
- _ScatterGatherBuffers.cs
- BitArray.cs
- WhitespaceSignificantCollectionAttribute.cs
- CompositeFontParser.cs
- _NetworkingPerfCounters.cs
- Message.cs
- SplitterDesigner.cs
- FrugalMap.cs
- SynthesizerStateChangedEventArgs.cs
- MemoryRecordBuffer.cs
- VirtualPathData.cs
- NewExpression.cs
- DesignerPerfEventProvider.cs
- WebBrowser.cs
- IDQuery.cs
- MetadataPropertyCollection.cs
- GridLength.cs
- UserControl.cs
- ObjectToken.cs
- EnumerableRowCollectionExtensions.cs
- FolderBrowserDialog.cs
- ADMembershipUser.cs
- FrameSecurityDescriptor.cs
- RootDesignerSerializerAttribute.cs
- TableLayoutColumnStyleCollection.cs
- EqualityComparer.cs
- XPathExpr.cs
- BasicKeyConstraint.cs
- SchemaSetCompiler.cs