Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DescriptionAttribute.cs / 1305376 / 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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
- RadioButtonPopupAdapter.cs
- ProcessHostConfigUtils.cs
- ObjectNavigationPropertyMapping.cs
- MailDefinition.cs
- AssertFilter.cs
- LifetimeServices.cs
- RegexFCD.cs
- _AuthenticationState.cs
- MediaScriptCommandRoutedEventArgs.cs
- DefinitionBase.cs
- ScriptingAuthenticationServiceSection.cs
- BitStack.cs
- _StreamFramer.cs
- GenericTypeParameterConverter.cs
- DigestTraceRecordHelper.cs
- SoapFormatterSinks.cs
- StreamAsIStream.cs
- PrinterResolution.cs
- SurrogateEncoder.cs
- PixelFormatConverter.cs
- XmlSchema.cs
- ColumnTypeConverter.cs
- XmlCharCheckingReader.cs
- Int32Storage.cs
- SimpleType.cs
- Emitter.cs
- IdentifierService.cs
- documentsequencetextcontainer.cs
- PublisherMembershipCondition.cs
- JsonCollectionDataContract.cs
- SystemIPAddressInformation.cs
- AdornerHitTestResult.cs
- DiscreteKeyFrames.cs
- ClrPerspective.cs
- FlowNode.cs
- TextProviderWrapper.cs
- SerializableAttribute.cs
- CircleHotSpot.cs
- SessionPageStateSection.cs
- JsonServiceDocumentSerializer.cs
- FormViewPagerRow.cs
- TableTextElementCollectionInternal.cs
- ProfileEventArgs.cs
- TranslateTransform.cs
- JobCollate.cs
- GridViewEditEventArgs.cs
- Source.cs
- ResourceDisplayNameAttribute.cs
- WebBrowser.cs
- ExpandCollapseProviderWrapper.cs
- PolicyConversionContext.cs
- SymbolUsageManager.cs
- UIAgentAsyncEndRequest.cs
- HandlerWithFactory.cs
- SecureStringHasher.cs
- MsmqOutputSessionChannel.cs
- VarRemapper.cs
- Operator.cs
- ApplicationId.cs
- GlyphTypeface.cs
- PropertyFilterAttribute.cs
- AmbiguousMatchException.cs
- IResourceProvider.cs
- ItemsPanelTemplate.cs
- Operators.cs
- XamlBuildTaskServices.cs
- Label.cs
- WorkflowApplicationIdleEventArgs.cs
- BindingWorker.cs
- LockCookie.cs
- PeerNameResolver.cs
- CompilerLocalReference.cs
- MetadataCacheItem.cs
- DropShadowBitmapEffect.cs
- SmtpNegotiateAuthenticationModule.cs
- ContentPresenter.cs
- Color.cs
- XmlUnspecifiedAttribute.cs
- EntityExpressionVisitor.cs
- DesignerAutoFormatCollection.cs
- TemplatePropertyEntry.cs
- FileDialogCustomPlaces.cs
- BadImageFormatException.cs
- DiscoveryDocumentSerializer.cs
- XmlSchemaValidator.cs
- UiaCoreProviderApi.cs
- CLRBindingWorker.cs
- SimpleHandlerFactory.cs
- SingleAnimationUsingKeyFrames.cs
- LinearGradientBrush.cs
- SqlGatherProducedAliases.cs
- Options.cs
- ViewValidator.cs
- RepeaterItemCollection.cs
- MD5CryptoServiceProvider.cs
- Util.cs
- GlyphRunDrawing.cs
- RegisteredExpandoAttribute.cs
- AsynchronousChannelMergeEnumerator.cs
- InitializerFacet.cs