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
- TreeNodeStyleCollection.cs
- ProjectionPath.cs
- ZoneLinkButton.cs
- DataGridRow.cs
- AnnotationObservableCollection.cs
- XmlSerializerFactory.cs
- RawTextInputReport.cs
- PerformanceCounterPermissionEntry.cs
- DiscoveryClientDocuments.cs
- WebServiceTypeData.cs
- Point.cs
- CreatingCookieEventArgs.cs
- PathNode.cs
- GeometryModel3D.cs
- CategoryAttribute.cs
- XmlSchemaAttribute.cs
- UnaryExpression.cs
- SspiHelper.cs
- RelatedView.cs
- keycontainerpermission.cs
- SemanticAnalyzer.cs
- ComEventsSink.cs
- EastAsianLunisolarCalendar.cs
- UInt64.cs
- SystemInformation.cs
- XmlHierarchicalEnumerable.cs
- WebScriptEnablingElement.cs
- X509CertificateCollection.cs
- New.cs
- TextEvent.cs
- NavigationEventArgs.cs
- MimeMapping.cs
- SpinWait.cs
- MailBnfHelper.cs
- XmlSubtreeReader.cs
- InstancePersistenceContext.cs
- WindowsFormsLinkLabel.cs
- TextRange.cs
- MaterializeFromAtom.cs
- XslAstAnalyzer.cs
- XmlDocumentViewSchema.cs
- StatusBarDrawItemEvent.cs
- ToolStripSystemRenderer.cs
- CodeSnippetTypeMember.cs
- MenuItemCollection.cs
- DbProviderFactoriesConfigurationHandler.cs
- ConstraintCollection.cs
- TextDecorationCollection.cs
- ScopelessEnumAttribute.cs
- TreeNode.cs
- IgnoreFlushAndCloseStream.cs
- HttpFileCollectionBase.cs
- MeasureItemEvent.cs
- DataGridItem.cs
- RegexMatchCollection.cs
- MetadataArtifactLoaderCompositeResource.cs
- PerfCounters.cs
- FontFamilyIdentifier.cs
- GridViewRowCollection.cs
- FormsAuthenticationConfiguration.cs
- NameTable.cs
- FloaterParaClient.cs
- ParameterReplacerVisitor.cs
- XmlSerializerSection.cs
- _AutoWebProxyScriptHelper.cs
- DataGridColumn.cs
- XmlIlGenerator.cs
- ListViewInsertEventArgs.cs
- ReaderWriterLockWrapper.cs
- XmlCustomFormatter.cs
- XsdCachingReader.cs
- FileDialogPermission.cs
- HorizontalAlignConverter.cs
- WizardForm.cs
- WebSysDefaultValueAttribute.cs
- CompositionAdorner.cs
- Triangle.cs
- ExtendedProperty.cs
- HtmlObjectListAdapter.cs
- ToolStripOverflow.cs
- NotifyParentPropertyAttribute.cs
- StringUtil.cs
- InplaceBitmapMetadataWriter.cs
- ActivityXamlServices.cs
- Ref.cs
- UnitControl.cs
- HotCommands.cs
- EmissiveMaterial.cs
- NetworkInformationException.cs
- Restrictions.cs
- FamilyMap.cs
- MemoryStream.cs
- WebConfigurationFileMap.cs
- ScrollPattern.cs
- ICspAsymmetricAlgorithm.cs
- UnsafeNativeMethods.cs
- SqlNotificationEventArgs.cs
- UrlMappingsModule.cs
- KeySplineConverter.cs
- MessageQueuePermissionEntry.cs