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
- AbstractExpressions.cs
- CorrelationTokenInvalidatedHandler.cs
- path.cs
- MaterialGroup.cs
- ButtonBaseAutomationPeer.cs
- fixedPageContentExtractor.cs
- ByteRangeDownloader.cs
- WebPartTransformer.cs
- UnaryNode.cs
- SortableBindingList.cs
- WeakKeyDictionary.cs
- LambdaCompiler.ControlFlow.cs
- Rfc2898DeriveBytes.cs
- DataRow.cs
- ActiveXHost.cs
- util.cs
- SetIterators.cs
- HtmlControlPersistable.cs
- DocumentSchemaValidator.cs
- MultilineStringConverter.cs
- Underline.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ListViewItem.cs
- XmlCompatibilityReader.cs
- JumpItem.cs
- BufferBuilder.cs
- MenuScrollingVisibilityConverter.cs
- DESCryptoServiceProvider.cs
- ProcessHostConfigUtils.cs
- CompareValidator.cs
- WorkflowPrinting.cs
- _IPv4Address.cs
- Walker.cs
- HtmlTableCellCollection.cs
- Config.cs
- MemoryFailPoint.cs
- XmlIterators.cs
- SoapObjectWriter.cs
- ContentValidator.cs
- RetrieveVirtualItemEventArgs.cs
- HMAC.cs
- XomlDesignerLoader.cs
- DropDownList.cs
- IItemProperties.cs
- SystemException.cs
- ByteAnimationBase.cs
- OrderedDictionaryStateHelper.cs
- SpellerError.cs
- CroppedBitmap.cs
- XamlTemplateSerializer.cs
- VisualTreeHelper.cs
- PinnedBufferMemoryStream.cs
- AuthenticationManager.cs
- SwitchAttribute.cs
- DataViewListener.cs
- WebSysDescriptionAttribute.cs
- GridViewSortEventArgs.cs
- SQLBytesStorage.cs
- HttpWebRequestElement.cs
- ApplicationDirectoryMembershipCondition.cs
- BroadcastEventHelper.cs
- ContentPathSegment.cs
- ChannelParameterCollection.cs
- ApplicationSettingsBase.cs
- SharedPersonalizationStateInfo.cs
- BuilderElements.cs
- EnumBuilder.cs
- ServiceObjectContainer.cs
- TextContainerChangedEventArgs.cs
- DefaultTextStore.cs
- Item.cs
- ByteViewer.cs
- MsmqTransportReceiveParameters.cs
- PolyLineSegment.cs
- TraceContext.cs
- SRef.cs
- TextTreeObjectNode.cs
- GridViewColumnCollection.cs
- DbDataRecord.cs
- AsyncDataRequest.cs
- RootAction.cs
- Rotation3DAnimationBase.cs
- NegationPusher.cs
- ToolStripDropTargetManager.cs
- ThicknessAnimationUsingKeyFrames.cs
- X509Chain.cs
- ManagementObject.cs
- DocumentXmlWriter.cs
- DataSourceDescriptorCollection.cs
- DataRowComparer.cs
- SymbolTable.cs
- CodeEntryPointMethod.cs
- XmlTypeMapping.cs
- MaskPropertyEditor.cs
- LocalBuilder.cs
- RayMeshGeometry3DHitTestResult.cs
- ExceptionTrace.cs
- HttpCacheParams.cs
- DispatcherEventArgs.cs
- SafeTimerHandle.cs