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
- invalidudtexception.cs
- PointHitTestParameters.cs
- HashRepartitionEnumerator.cs
- GroupDescription.cs
- SqlConnectionStringBuilder.cs
- UrlMappingsModule.cs
- ToolStripDropDownItemDesigner.cs
- ClientSettingsStore.cs
- NotifyInputEventArgs.cs
- SendMailErrorEventArgs.cs
- FixedSOMLineCollection.cs
- Propagator.ExtentPlaceholderCreator.cs
- BackStopAuthenticationModule.cs
- RadioButtonList.cs
- MDIClient.cs
- BitSet.cs
- DragDeltaEventArgs.cs
- OrderPreservingMergeHelper.cs
- FileStream.cs
- BamlLocalizableResource.cs
- WebServicesDescriptionAttribute.cs
- StrongNameKeyPair.cs
- OutputWindow.cs
- HttpCachePolicyBase.cs
- TemplateManager.cs
- ImageMap.cs
- TemplateBindingExtensionConverter.cs
- MessageQueueCriteria.cs
- HttpCapabilitiesEvaluator.cs
- WebBrowserContainer.cs
- DataGridViewControlCollection.cs
- OnOperation.cs
- HttpWebRequest.cs
- ServiceAppDomainAssociationProvider.cs
- Interlocked.cs
- LocalizationComments.cs
- ColumnWidthChangingEvent.cs
- SpanIndex.cs
- IPipelineRuntime.cs
- ConversionContext.cs
- ShellProvider.cs
- Hex.cs
- WeakHashtable.cs
- InvalidDataException.cs
- DotAtomReader.cs
- DoubleLinkList.cs
- SecurityTokenAttachmentMode.cs
- HiddenField.cs
- ComponentEvent.cs
- AutomationElement.cs
- TraceContext.cs
- IISUnsafeMethods.cs
- DateTimeOffsetAdapter.cs
- regiisutil.cs
- ISessionStateStore.cs
- ObjectItemCollection.cs
- PropertyGeneratedEventArgs.cs
- MimeParameterWriter.cs
- SegmentInfo.cs
- WindowsToolbar.cs
- StylusButtonEventArgs.cs
- Underline.cs
- DescendentsWalkerBase.cs
- NumericExpr.cs
- XmlDataLoader.cs
- Page.cs
- AliasExpr.cs
- UnauthorizedAccessException.cs
- MinMaxParagraphWidth.cs
- ObjectContextServiceProvider.cs
- storepermission.cs
- PlainXmlSerializer.cs
- SortDescription.cs
- LoginStatusDesigner.cs
- Internal.cs
- SizeAnimationBase.cs
- StringAnimationUsingKeyFrames.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- Evidence.cs
- SqlNotificationEventArgs.cs
- Splitter.cs
- DisposableCollectionWrapper.cs
- mediapermission.cs
- DataServices.cs
- PixelFormats.cs
- DispatcherHooks.cs
- ClassHandlersStore.cs
- BooleanStorage.cs
- DataContractSerializerOperationGenerator.cs
- RegistrySecurity.cs
- WSSecurityPolicy12.cs
- Section.cs
- TouchesOverProperty.cs
- BulletChrome.cs
- PassportAuthenticationEventArgs.cs
- SiteMapNodeItemEventArgs.cs
- ConvertEvent.cs
- OperatingSystem.cs
- httpserverutility.cs
- DataGridItemEventArgs.cs