Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DescriptionAttribute.cs / 1305376 / 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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
- UpdateManifestForBrowserApplication.cs
- DrawingState.cs
- Substitution.cs
- ReadOnlyNameValueCollection.cs
- ToolStripGrip.cs
- Zone.cs
- DropShadowEffect.cs
- OleCmdHelper.cs
- DateTimeEditor.cs
- ContentType.cs
- SessionEndingEventArgs.cs
- CompilerResults.cs
- diagnosticsswitches.cs
- RadioButtonPopupAdapter.cs
- InvalidAsynchronousStateException.cs
- SecurityTimestamp.cs
- DoubleAnimationUsingKeyFrames.cs
- linebase.cs
- RegisteredExpandoAttribute.cs
- Decorator.cs
- AssociationType.cs
- DNS.cs
- PhonemeConverter.cs
- Button.cs
- BinaryMessageEncodingBindingElement.cs
- TemplateBamlRecordReader.cs
- MdImport.cs
- ElementInit.cs
- ToolStripDropDownMenu.cs
- RsaSecurityKey.cs
- Scanner.cs
- XmlTypeAttribute.cs
- HtmlInputControl.cs
- CatalogPartCollection.cs
- SqlBulkCopyColumnMapping.cs
- ListMarkerLine.cs
- SID.cs
- exports.cs
- PanelStyle.cs
- SqlRowUpdatedEvent.cs
- SmtpSection.cs
- ClientCultureInfo.cs
- Figure.cs
- WinFormsUtils.cs
- BindingWorker.cs
- ListBoxItemAutomationPeer.cs
- ColorBuilder.cs
- TextModifier.cs
- Int32.cs
- FlowDocument.cs
- ValueSerializerAttribute.cs
- CompiledAction.cs
- ApplicationProxyInternal.cs
- DLinqColumnProvider.cs
- SystemEvents.cs
- Axis.cs
- UrlMappingsModule.cs
- OutputCacheModule.cs
- SQLDecimalStorage.cs
- WindowsFont.cs
- UserControlBuildProvider.cs
- EventMappingSettings.cs
- PersonalizablePropertyEntry.cs
- DataGridColumnHeader.cs
- UnionExpr.cs
- MimeFormReflector.cs
- FileDialogPermission.cs
- DifferencingCollection.cs
- EmbeddedMailObject.cs
- DefaultEventAttribute.cs
- _ConnectionGroup.cs
- IncrementalReadDecoders.cs
- UnsafeNativeMethods.cs
- PropertyMappingExceptionEventArgs.cs
- MembershipValidatePasswordEventArgs.cs
- ButtonField.cs
- SamlDelegatingWriter.cs
- XpsManager.cs
- FontNamesConverter.cs
- ViewCellSlot.cs
- AssociationProvider.cs
- CellCreator.cs
- PerformanceCounterManager.cs
- OleAutBinder.cs
- DriveNotFoundException.cs
- BamlRecordReader.cs
- InputBuffer.cs
- MediaEntryAttribute.cs
- TextEditorSelection.cs
- TransformPatternIdentifiers.cs
- ObjectConverter.cs
- BulletChrome.cs
- MessageBox.cs
- AutomationPatternInfo.cs
- XmlNodeList.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DesignerSerializerAttribute.cs
- ButtonAutomationPeer.cs
- String.cs
- SelectionEditor.cs