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
- ImportContext.cs
- ValueOfAction.cs
- TypeEnumerableViewSchema.cs
- RayMeshGeometry3DHitTestResult.cs
- ControlParameter.cs
- MinimizableAttributeTypeConverter.cs
- TrustSection.cs
- ResolveCriteriaApril2005.cs
- DiscoveryReferences.cs
- _ConnectStream.cs
- OutKeywords.cs
- DefaultPerformanceCounters.cs
- initElementDictionary.cs
- FormattedTextSymbols.cs
- EntityTypeEmitter.cs
- EnumValidator.cs
- FilterableAttribute.cs
- ReceiveActivityDesignerTheme.cs
- GlyphShapingProperties.cs
- MessageDecoder.cs
- sqlnorm.cs
- MethodBuilder.cs
- ListViewTableRow.cs
- UInt64Converter.cs
- StylusPointPropertyId.cs
- InternalBufferOverflowException.cs
- AliasExpr.cs
- TextParagraph.cs
- DbDeleteCommandTree.cs
- SelectedDatesCollection.cs
- HwndSubclass.cs
- UnsafeNativeMethodsTablet.cs
- BeginEvent.cs
- ExpressionStringBuilder.cs
- CommonDialog.cs
- ListViewItem.cs
- ElementAtQueryOperator.cs
- SeekStoryboard.cs
- Menu.cs
- TextRangeEditLists.cs
- _DomainName.cs
- HttpVersion.cs
- FullTextBreakpoint.cs
- SqlExpander.cs
- ValidateNames.cs
- NamespaceInfo.cs
- RawMouseInputReport.cs
- GPRECT.cs
- WorkItem.cs
- TypeNameConverter.cs
- SecurityState.cs
- GeometryGroup.cs
- SoapObjectReader.cs
- SyncMethodInvoker.cs
- CodeArgumentReferenceExpression.cs
- SmtpNetworkElement.cs
- SettingsAttributeDictionary.cs
- ContentOperations.cs
- SiteMapProvider.cs
- BuildProviderAppliesToAttribute.cs
- Slider.cs
- DbFunctionCommandTree.cs
- SqlUdtInfo.cs
- Dynamic.cs
- EnumValidator.cs
- NewItemsContextMenuStrip.cs
- InstallerTypeAttribute.cs
- HtmlMobileTextWriter.cs
- CharAnimationBase.cs
- XmlWhitespace.cs
- followingquery.cs
- DbProviderFactoriesConfigurationHandler.cs
- ImmutableObjectAttribute.cs
- ControlAdapter.cs
- SystemIcmpV6Statistics.cs
- CharEntityEncoderFallback.cs
- ProfileInfo.cs
- AddressUtility.cs
- DSASignatureFormatter.cs
- _ConnectOverlappedAsyncResult.cs
- RuntimeCompatibilityAttribute.cs
- BuildManager.cs
- RelAssertionDirectKeyIdentifierClause.cs
- X509Certificate2.cs
- ProgressiveCrcCalculatingStream.cs
- BulletChrome.cs
- WindowsStatic.cs
- _NestedMultipleAsyncResult.cs
- EditingMode.cs
- Certificate.cs
- XmlSchemaIdentityConstraint.cs
- ResourceReferenceExpression.cs
- TextDocumentView.cs
- CodePageEncoding.cs
- DefaultValidator.cs
- DbDeleteCommandTree.cs
- Update.cs
- ScriptingRoleServiceSection.cs
- GroupQuery.cs
- InternalTypeHelper.cs