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
- FilteredDataSetHelper.cs
- CalendarDateRangeChangingEventArgs.cs
- TdsParameterSetter.cs
- HostedTcpTransportManager.cs
- LoginView.cs
- VerificationException.cs
- UseAttributeSetsAction.cs
- MeasureData.cs
- InheritanceContextChangedEventManager.cs
- Gdiplus.cs
- GridView.cs
- WebCategoryAttribute.cs
- SqlDelegatedTransaction.cs
- TagPrefixCollection.cs
- KeyTimeConverter.cs
- KoreanLunisolarCalendar.cs
- DataContractSerializerSection.cs
- OleAutBinder.cs
- ScriptBehaviorDescriptor.cs
- DataPagerFieldCommandEventArgs.cs
- Span.cs
- DoubleSumAggregationOperator.cs
- MiniAssembly.cs
- SafeRegistryHandle.cs
- EdmEntityTypeAttribute.cs
- AuthorizationRule.cs
- PointConverter.cs
- PrePrepareMethodAttribute.cs
- TextEndOfSegment.cs
- DoubleConverter.cs
- RoutedEventHandlerInfo.cs
- RunInstallerAttribute.cs
- ValueTypePropertyReference.cs
- SplitterEvent.cs
- AcceleratedTokenProviderState.cs
- DBPropSet.cs
- TimeSpanHelper.cs
- ZipIOLocalFileDataDescriptor.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- SqlMethodCallConverter.cs
- WinEventTracker.cs
- TcpAppDomainProtocolHandler.cs
- ListControlActionList.cs
- TypedReference.cs
- TransportConfigurationTypeElementCollection.cs
- ListBox.cs
- XmlParser.cs
- DataTableReader.cs
- TextElement.cs
- SapiAttributeParser.cs
- OutputCacheSettingsSection.cs
- Border.cs
- DispatchChannelSink.cs
- XamlHostingSectionGroup.cs
- AppSettingsExpressionBuilder.cs
- PropertyChangingEventArgs.cs
- SerialStream.cs
- PeerValidationBehavior.cs
- CancelEventArgs.cs
- Events.cs
- DataGridViewLayoutData.cs
- ContextMenu.cs
- AccessDataSourceView.cs
- UserControlParser.cs
- TypeDescriptionProviderAttribute.cs
- Math.cs
- DefaultPrintController.cs
- PropertyCondition.cs
- OracleTimeSpan.cs
- DynamicILGenerator.cs
- Pen.cs
- RuntimeHelpers.cs
- SqlException.cs
- IconBitmapDecoder.cs
- TreeIterator.cs
- Random.cs
- FileSystemEventArgs.cs
- TickBar.cs
- XmlQueryOutput.cs
- DataGridViewHitTestInfo.cs
- OutOfProcStateClientManager.cs
- HiddenField.cs
- EventlogProvider.cs
- AutoFocusStyle.xaml.cs
- HierarchicalDataBoundControlAdapter.cs
- CalendarDay.cs
- Connection.cs
- PartialCachingControl.cs
- Attributes.cs
- DocumentEventArgs.cs
- EventLogEntryCollection.cs
- OptionalRstParameters.cs
- DiscoveryClientOutputChannel.cs
- WindowsFormsEditorServiceHelper.cs
- EventBuilder.cs
- XmlSecureResolver.cs
- WorkflowRuntime.cs
- RegexMatchCollection.cs
- IntranetCredentialPolicy.cs
- SafeNativeMethods.cs