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
- CompiledRegexRunner.cs
- KeyGesture.cs
- IntegerValidatorAttribute.cs
- MsmqIntegrationOutputChannel.cs
- OdbcError.cs
- ParameterReplacerVisitor.cs
- LocalizedNameDescriptionPair.cs
- SiteMap.cs
- SharedPersonalizationStateInfo.cs
- ComAdminInterfaces.cs
- PartialTrustVisibleAssembliesSection.cs
- EntityCollection.cs
- TextTreeTextNode.cs
- StyleModeStack.cs
- DoubleConverter.cs
- WorkflowPrinting.cs
- FrameworkContentElement.cs
- Attachment.cs
- Bold.cs
- AuthenticationModuleElementCollection.cs
- ParseChildrenAsPropertiesAttribute.cs
- StringSorter.cs
- TextAdaptor.cs
- OrderingExpression.cs
- HttpException.cs
- ApplicationSecurityInfo.cs
- mediaeventshelper.cs
- LineGeometry.cs
- PingOptions.cs
- DropSource.cs
- HtmlControlPersistable.cs
- MatrixTransform.cs
- SelectionList.cs
- FileDialog.cs
- TableRow.cs
- XmlIlGenerator.cs
- RuntimeWrappedException.cs
- ButtonFlatAdapter.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- ToolStripKeyboardHandlingService.cs
- ResourcesGenerator.cs
- ReliableSessionBindingElementImporter.cs
- QilPatternFactory.cs
- D3DImage.cs
- HttpClientCertificate.cs
- RequestUriProcessor.cs
- Wildcard.cs
- ExpressionBindingsDialog.cs
- InternalBufferOverflowException.cs
- DesignerAttribute.cs
- ToolStripItemEventArgs.cs
- IdlingCommunicationPool.cs
- HashCodeCombiner.cs
- PropVariant.cs
- DataSvcMapFile.cs
- DeploymentExceptionMapper.cs
- XmlSchemaChoice.cs
- ErrorHandler.cs
- Documentation.cs
- ArrayTypeMismatchException.cs
- X509SubjectKeyIdentifierClause.cs
- ListBoxChrome.cs
- TemplateContent.cs
- ISessionStateStore.cs
- MemberHolder.cs
- PersistChildrenAttribute.cs
- FocusWithinProperty.cs
- SmiGettersStream.cs
- DataGridCaption.cs
- WebReference.cs
- XPathMultyIterator.cs
- MetadataArtifactLoaderCompositeFile.cs
- CompositeFontInfo.cs
- OdbcErrorCollection.cs
- PageSetupDialog.cs
- Avt.cs
- HtmlInputImage.cs
- SystemIPv6InterfaceProperties.cs
- ContainerParaClient.cs
- ReverseQueryOperator.cs
- BinaryFormatter.cs
- StoragePropertyMapping.cs
- ArraySortHelper.cs
- CompatibleComparer.cs
- FontWeight.cs
- DetailsViewDeletedEventArgs.cs
- SmtpException.cs
- ViewGenerator.cs
- DecimalMinMaxAggregationOperator.cs
- TimeSpanStorage.cs
- WebPartManager.cs
- EncryptedData.cs
- TextBlock.cs
- EntityParameter.cs
- PKCS1MaskGenerationMethod.cs
- BindingValueChangedEventArgs.cs
- ConstructorNeedsTagAttribute.cs
- ObjectSecurity.cs
- NullableDoubleSumAggregationOperator.cs
- PriorityQueue.cs