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
- AssemblyEvidenceFactory.cs
- Stylus.cs
- WpfKnownMember.cs
- RowParagraph.cs
- ConnectionsZone.cs
- ProjectionNode.cs
- odbcmetadatafactory.cs
- ModuleBuilderData.cs
- TransactionTable.cs
- ResXResourceSet.cs
- PropertyTabAttribute.cs
- HashSet.cs
- CodeConstructor.cs
- UndoManager.cs
- ZipIOExtraFieldElement.cs
- HttpCapabilitiesBase.cs
- WebPartCatalogCloseVerb.cs
- AssociationType.cs
- DllNotFoundException.cs
- CompositeCollection.cs
- ScriptRegistrationManager.cs
- StickyNote.cs
- ApplicationInterop.cs
- SystemIPGlobalProperties.cs
- FirstMatchCodeGroup.cs
- EntitySqlQueryState.cs
- IsolatedStorageFilePermission.cs
- EntityProviderServices.cs
- CodeTryCatchFinallyStatement.cs
- Win32PrintDialog.cs
- WarningException.cs
- ColorAnimation.cs
- CodeConstructor.cs
- Hashtable.cs
- StopStoryboard.cs
- GatewayDefinition.cs
- SecureConversationServiceElement.cs
- DBConnection.cs
- Stopwatch.cs
- DefaultMemberAttribute.cs
- OdbcStatementHandle.cs
- StyleTypedPropertyAttribute.cs
- SQLDateTimeStorage.cs
- Geometry3D.cs
- TemplateParser.cs
- BaseCodePageEncoding.cs
- IImplicitResourceProvider.cs
- IdentityValidationException.cs
- Parallel.cs
- BrowserTree.cs
- DeviceSpecific.cs
- SecurityToken.cs
- SafeCertificateStore.cs
- SupportingTokenChannel.cs
- BamlRecordWriter.cs
- PartitionerStatic.cs
- GeometryModel3D.cs
- SmiRecordBuffer.cs
- FlowDocumentPage.cs
- Graphics.cs
- OlePropertyStructs.cs
- cryptoapiTransform.cs
- IfAction.cs
- StrongNameKeyPair.cs
- DocumentOrderQuery.cs
- RelatedImageListAttribute.cs
- Trigger.cs
- TableProvider.cs
- HttpModulesSection.cs
- PathSegmentCollection.cs
- WorkItem.cs
- PropertyMetadata.cs
- SerialErrors.cs
- PrintPageEvent.cs
- IndexedWhereQueryOperator.cs
- CodeExpressionCollection.cs
- EnumerableCollectionView.cs
- KernelTypeValidation.cs
- DeflateStreamAsyncResult.cs
- WebPartEventArgs.cs
- StrokeCollectionDefaultValueFactory.cs
- FontStyleConverter.cs
- versioninfo.cs
- EntityDataSourceValidationException.cs
- BitVector32.cs
- StickyNoteAnnotations.cs
- SoapWriter.cs
- NavigationHelper.cs
- X509LogoTypeExtension.cs
- ListViewDataItem.cs
- EditorAttribute.cs
- CustomAttributeFormatException.cs
- ContextQuery.cs
- AnimationException.cs
- WeakEventManager.cs
- PropertyChangeTracker.cs
- MenuDesigner.cs
- CancelEventArgs.cs
- PlainXmlWriter.cs
- BinaryCommonClasses.cs