Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DockPanel.cs
- ArgumentsParser.cs
- DataQuery.cs
- StrokeNodeEnumerator.cs
- SystemFonts.cs
- BoolExpr.cs
- DashStyles.cs
- SecurityResources.cs
- ListViewItemEventArgs.cs
- CallbackWrapper.cs
- CustomExpressionEventArgs.cs
- DropDownButton.cs
- SecurityElement.cs
- XPathConvert.cs
- GeneratedView.cs
- FileLevelControlBuilderAttribute.cs
- TypeUsageBuilder.cs
- QuotedStringFormatReader.cs
- SpeechRecognizer.cs
- DataGridBeginningEditEventArgs.cs
- NegatedCellConstant.cs
- SqlTransaction.cs
- PointCollection.cs
- TerminatorSinks.cs
- DbDeleteCommandTree.cs
- XmlException.cs
- MappedMetaModel.cs
- PolicyStatement.cs
- AnimationLayer.cs
- X509Utils.cs
- SoapReflectionImporter.cs
- Globals.cs
- XmlSchemaRedefine.cs
- WebPartConnectionsCancelEventArgs.cs
- HttpResponseInternalWrapper.cs
- AttributeAction.cs
- JsonStringDataContract.cs
- ellipse.cs
- NamespaceListProperty.cs
- FrameworkRichTextComposition.cs
- HiddenField.cs
- TaiwanCalendar.cs
- TemplatedMailWebEventProvider.cs
- Convert.cs
- BinaryFormatterWriter.cs
- ColorConvertedBitmap.cs
- IndexedEnumerable.cs
- TypeDescriptorContext.cs
- JournalNavigationScope.cs
- CheckedPointers.cs
- DataKey.cs
- SQLInt16.cs
- XslCompiledTransform.cs
- CorrelationManager.cs
- CodeVariableDeclarationStatement.cs
- ProjectionPlan.cs
- ButtonChrome.cs
- ConfigXmlDocument.cs
- DispatchOperation.cs
- DataServiceClientException.cs
- HandlerBase.cs
- ButtonChrome.cs
- MarkupCompiler.cs
- FileChangesMonitor.cs
- SystemColors.cs
- SchemaImporterExtension.cs
- FormViewPagerRow.cs
- QilXmlWriter.cs
- QuadraticBezierSegment.cs
- TableAutomationPeer.cs
- DataBinding.cs
- XslCompiledTransform.cs
- ConfigurationSchemaErrors.cs
- ConfigurationValidatorAttribute.cs
- PenContexts.cs
- NavigationExpr.cs
- RoutedUICommand.cs
- PictureBoxDesigner.cs
- ResourceLoader.cs
- Inflater.cs
- Mutex.cs
- isolationinterop.cs
- UIPermission.cs
- CodeSnippetStatement.cs
- HttpModuleActionCollection.cs
- SessionMode.cs
- SendSecurityHeaderElement.cs
- ColorAnimation.cs
- SinglePageViewer.cs
- RsaKeyIdentifierClause.cs
- PasswordDeriveBytes.cs
- DataView.cs
- TimelineCollection.cs
- DeclarationUpdate.cs
- AQNBuilder.cs
- GlyphRun.cs
- CounterSample.cs
- InputProcessorProfiles.cs
- MobileErrorInfo.cs
- WebPartHelpVerb.cs