Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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)); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DrawListViewSubItemEventArgs.cs
- MenuAdapter.cs
- ImageAttributes.cs
- PageRanges.cs
- PagesSection.cs
- SafeNativeMethods.cs
- FocusTracker.cs
- CssTextWriter.cs
- RadialGradientBrush.cs
- Pkcs7Signer.cs
- UnsafeNativeMethods.cs
- BindingManagerDataErrorEventArgs.cs
- Delegate.cs
- DiscoveryDefaults.cs
- Component.cs
- ConnectionInterfaceCollection.cs
- SetIndexBinder.cs
- UriSectionData.cs
- IISMapPath.cs
- HWStack.cs
- SafeCertificateContext.cs
- CurrentTimeZone.cs
- InputProcessorProfiles.cs
- InstanceData.cs
- httpapplicationstate.cs
- ImageInfo.cs
- XmlLoader.cs
- PersistenceTypeAttribute.cs
- EmptyEnumerator.cs
- BufferedReadStream.cs
- PropertyNames.cs
- GeometryHitTestParameters.cs
- VectorConverter.cs
- TraceLevelStore.cs
- RawContentTypeMapper.cs
- HttpContext.cs
- ListBox.cs
- CompositeDataBoundControl.cs
- EntityException.cs
- DelegatedStream.cs
- ViewSimplifier.cs
- RemoteWebConfigurationHost.cs
- TemplateColumn.cs
- PassportPrincipal.cs
- PeoplePickerWrapper.cs
- BamlBinaryReader.cs
- DataGridViewColumnTypeEditor.cs
- WebInvokeAttribute.cs
- DataGridViewButtonColumn.cs
- StructuredTypeEmitter.cs
- ZipIOExtraFieldElement.cs
- DigestComparer.cs
- ReadOnlyCollectionBase.cs
- XmlCustomFormatter.cs
- SiteMapHierarchicalDataSourceView.cs
- XmlWhitespace.cs
- SqlBulkCopy.cs
- XmlArrayItemAttribute.cs
- StorageMappingFragment.cs
- LinkArea.cs
- XmlStreamStore.cs
- CookieProtection.cs
- QilIterator.cs
- GraphicsState.cs
- CompilationUnit.cs
- _TimerThread.cs
- XpsS0ValidatingLoader.cs
- XamlFigureLengthSerializer.cs
- AnnouncementClient.cs
- PropertyExpression.cs
- XmlNamespaceDeclarationsAttribute.cs
- ObfuscateAssemblyAttribute.cs
- ServiceCredentialsElement.cs
- PackageFilter.cs
- SerializationSectionGroup.cs
- AdjustableArrowCap.cs
- StylusDevice.cs
- ImageSource.cs
- ComponentDispatcher.cs
- StatusBarItemAutomationPeer.cs
- DrawingState.cs
- TreeNodeConverter.cs
- BatchWriter.cs
- ErrorProvider.cs
- EngineSiteSapi.cs
- fixedPageContentExtractor.cs
- UIElementIsland.cs
- RepeatBehaviorConverter.cs
- GlobalizationAssembly.cs
- MemoryStream.cs
- SafeMILHandleMemoryPressure.cs
- PageAsyncTaskManager.cs
- GeneralTransform3D.cs
- ConfigXmlAttribute.cs
- CredentialCache.cs
- XmlWriterDelegator.cs
- AsymmetricSignatureFormatter.cs
- ByteStreamMessageUtility.cs
- StylusPointPropertyId.cs
- DataColumnCollection.cs