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
- LinearGradientBrush.cs
- TransformerConfigurationWizardBase.cs
- PageThemeParser.cs
- WhitespaceReader.cs
- UrlMappingsModule.cs
- ProfileSettings.cs
- VSWCFServiceContractGenerator.cs
- SQLByte.cs
- UnsafeNativeMethods.cs
- TraceUtils.cs
- DocComment.cs
- EntityContainerEmitter.cs
- PartManifestEntry.cs
- ApplicationActivator.cs
- TemplateParser.cs
- SystemIcmpV6Statistics.cs
- Update.cs
- MetadataItemEmitter.cs
- FunctionImportMapping.cs
- ToolStripLocationCancelEventArgs.cs
- XmlUtil.cs
- FigureHelper.cs
- SyndicationSerializer.cs
- ComboBox.cs
- BaseTemplateParser.cs
- TemplatePartAttribute.cs
- HtmlMobileTextWriter.cs
- DocumentViewerBaseAutomationPeer.cs
- TimelineCollection.cs
- SQLSingle.cs
- HandledMouseEvent.cs
- DbDataAdapter.cs
- TaiwanLunisolarCalendar.cs
- ItemCollection.cs
- NavigatorOutput.cs
- Header.cs
- UpdatePanelControlTrigger.cs
- HttpDigestClientCredential.cs
- PaginationProgressEventArgs.cs
- ListMarkerSourceInfo.cs
- xsdvalidator.cs
- ResourceReferenceExpression.cs
- httpstaticobjectscollection.cs
- WindowsImpersonationContext.cs
- InkPresenterAutomationPeer.cs
- ContextMenuAutomationPeer.cs
- HTMLTextWriter.cs
- CryptoKeySecurity.cs
- MeasureItemEvent.cs
- GenericIdentity.cs
- COM2TypeInfoProcessor.cs
- TaiwanCalendar.cs
- SpellCheck.cs
- BamlTreeUpdater.cs
- SspiHelper.cs
- DifferencingCollection.cs
- InvalidOleVariantTypeException.cs
- ConfigWriter.cs
- AuthenticationModuleElement.cs
- ExpressionList.cs
- X509WindowsSecurityToken.cs
- ZipPackage.cs
- Stopwatch.cs
- ZoomComboBox.cs
- ConnectionStringsSection.cs
- ToolStripManager.cs
- ApplicationContext.cs
- ToolStripRendererSwitcher.cs
- StandardToolWindows.cs
- EnumValAlphaComparer.cs
- ActiveDocumentEvent.cs
- ResourceReferenceExpression.cs
- Collection.cs
- HtmlString.cs
- AssemblyNameProxy.cs
- MetadataProperty.cs
- TrackingProfileSerializer.cs
- SqlExpander.cs
- AsymmetricAlgorithm.cs
- Rect3D.cs
- MarshalByRefObject.cs
- ServiceHttpHandlerFactory.cs
- IsolatedStorageFilePermission.cs
- GridViewUpdateEventArgs.cs
- BitmapEffectvisualstate.cs
- SelectionChangedEventArgs.cs
- RegistryConfigurationProvider.cs
- ReturnEventArgs.cs
- MbpInfo.cs
- FilePrompt.cs
- TextFormatterContext.cs
- PopOutPanel.cs
- ThrowHelper.cs
- Closure.cs
- CacheSection.cs
- DocumentViewerAutomationPeer.cs
- BooleanSwitch.cs
- Rect3D.cs
- UIElement.cs
- PropertyValueUIItem.cs