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
- UpdateTranslator.cs
- printdlgexmarshaler.cs
- PermissionSet.cs
- PropertyEmitter.cs
- GifBitmapDecoder.cs
- SystemIPInterfaceProperties.cs
- NonBatchDirectoryCompiler.cs
- TextSerializer.cs
- Thread.cs
- CodeArrayCreateExpression.cs
- DataGridViewCellStateChangedEventArgs.cs
- MembershipSection.cs
- TextLineBreak.cs
- ComponentResourceKeyConverter.cs
- WizardSideBarListControlItemEventArgs.cs
- List.cs
- PackWebResponse.cs
- DiscoveryReference.cs
- Thumb.cs
- UpDownBaseDesigner.cs
- CriticalFinalizerObject.cs
- UniqueConstraint.cs
- httpstaticobjectscollection.cs
- InvalidDataException.cs
- RepeaterItemEventArgs.cs
- BaseDataBoundControl.cs
- BitmapEffectGroup.cs
- CurrentChangingEventArgs.cs
- OutputCache.cs
- CursorConverter.cs
- XmlDataLoader.cs
- SchemaImporter.cs
- ThreadInterruptedException.cs
- _SSPIWrapper.cs
- ApplicationActivator.cs
- PointAnimation.cs
- XmlDomTextWriter.cs
- CounterSampleCalculator.cs
- SecurityChannel.cs
- TextEditorDragDrop.cs
- XmlSchemaRedefine.cs
- DataViewSetting.cs
- InvalidDataException.cs
- DataGridViewMethods.cs
- DataBoundControlAdapter.cs
- HttpListener.cs
- PreservationFileWriter.cs
- CheckBoxAutomationPeer.cs
- TabPageDesigner.cs
- TypeDescriptionProvider.cs
- ServerType.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- PeerCollaboration.cs
- SingleResultAttribute.cs
- OSFeature.cs
- ComplusEndpointConfigContainer.cs
- MultiTrigger.cs
- OleDbCommandBuilder.cs
- DrawingImage.cs
- X509SubjectKeyIdentifierClause.cs
- SecureStringHasher.cs
- Size.cs
- IndentedWriter.cs
- EventProviderWriter.cs
- IIS7WorkerRequest.cs
- sqlstateclientmanager.cs
- IgnoreDataMemberAttribute.cs
- DiagnosticsConfigurationHandler.cs
- ManagementDateTime.cs
- OpenTypeLayoutCache.cs
- ListItemsCollectionEditor.cs
- DocumentProperties.cs
- CompiledQueryCacheEntry.cs
- _emptywebproxy.cs
- IUnknownConstantAttribute.cs
- DataControlReference.cs
- AutoGeneratedFieldProperties.cs
- ImageListStreamer.cs
- StickyNoteAnnotations.cs
- FactoryGenerator.cs
- DataGridViewSelectedCellCollection.cs
- Listbox.cs
- Thumb.cs
- Run.cs
- TraceLog.cs
- Content.cs
- ThicknessConverter.cs
- File.cs
- GridViewUpdateEventArgs.cs
- CalendarDayButton.cs
- TextTreeTextElementNode.cs
- DayRenderEvent.cs
- FontDialog.cs
- HttpModuleAction.cs
- Enum.cs
- RuntimeArgument.cs
- DSASignatureDeformatter.cs
- CompilerErrorCollection.cs
- BaseParser.cs
- DragCompletedEventArgs.cs