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
- ObjectList.cs
- DataGridHeaderBorder.cs
- TrustLevel.cs
- BaseCollection.cs
- StickyNoteContentControl.cs
- QilCloneVisitor.cs
- ColorPalette.cs
- MyContact.cs
- ErrorWebPart.cs
- InputEventArgs.cs
- RemoteCryptoSignHashRequest.cs
- ObjectConverter.cs
- SqlUserDefinedTypeAttribute.cs
- WCFBuildProvider.cs
- ObjectViewFactory.cs
- TileBrush.cs
- AnimatedTypeHelpers.cs
- ActiveXMessageFormatter.cs
- ConfigDefinitionUpdates.cs
- InternalConfigEventArgs.cs
- GraphicsContext.cs
- IdentitySection.cs
- ThreadAttributes.cs
- SpinWait.cs
- NodeInfo.cs
- SoapSchemaExporter.cs
- MetadataExchangeClient.cs
- sitestring.cs
- SendSecurityHeaderElementContainer.cs
- ReadContentAsBinaryHelper.cs
- DbConnectionPool.cs
- DateRangeEvent.cs
- CodePageUtils.cs
- ReadContentAsBinaryHelper.cs
- FlatButtonAppearance.cs
- ListParagraph.cs
- DocumentOutline.cs
- ColorConverter.cs
- CreateUserWizardStep.cs
- ObjectReaderCompiler.cs
- AddressAccessDeniedException.cs
- HttpListenerPrefixCollection.cs
- ScriptReferenceEventArgs.cs
- AppSettingsExpressionBuilder.cs
- DataGrid.cs
- MasterPage.cs
- XmlSubtreeReader.cs
- StateRuntime.cs
- DataGridTablesFactory.cs
- Size3DConverter.cs
- MenuItem.cs
- XmlNullResolver.cs
- XsdBuildProvider.cs
- SessionPageStatePersister.cs
- CodeTryCatchFinallyStatement.cs
- Vector3DConverter.cs
- EmptyEnumerator.cs
- Hyperlink.cs
- CodeIndexerExpression.cs
- DocumentOrderQuery.cs
- XMLSchema.cs
- ExceptionRoutedEventArgs.cs
- FileDetails.cs
- MetadataElement.cs
- PlainXmlSerializer.cs
- ResourceAssociationType.cs
- ResourceDescriptionAttribute.cs
- StateValidator.cs
- JournalEntryStack.cs
- QueryContinueDragEventArgs.cs
- Speller.cs
- ConfigurationValidatorBase.cs
- WeakReference.cs
- PolicyManager.cs
- PolicyStatement.cs
- ScaleTransform3D.cs
- FlowLayoutPanel.cs
- SpeechSeg.cs
- XmlNodeChangedEventArgs.cs
- ExtenderControl.cs
- PopupRoot.cs
- ObjectViewEntityCollectionData.cs
- ListCollectionView.cs
- BindingExpression.cs
- AssemblyBuilder.cs
- UnauthorizedAccessException.cs
- Point.cs
- validationstate.cs
- HttpModuleAction.cs
- SafeFindHandle.cs
- DecoderFallbackWithFailureFlag.cs
- HotCommands.cs
- Timer.cs
- ReversePositionQuery.cs
- Enlistment.cs
- Error.cs
- WinCategoryAttribute.cs
- GrammarBuilderPhrase.cs
- QueryContinueDragEvent.cs
- IInstanceTable.cs