Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- LogWriteRestartAreaState.cs
- PermissionSetTriple.cs
- ListControl.cs
- StringFunctions.cs
- FormViewDesigner.cs
- OdbcConnectionString.cs
- ServicePointManagerElement.cs
- DataStorage.cs
- LayoutTable.cs
- SEHException.cs
- TreeNodeStyleCollection.cs
- BulletChrome.cs
- SqlBuffer.cs
- SourceExpressionException.cs
- ParameterToken.cs
- WsdlParser.cs
- storepermission.cs
- TextServicesCompartmentContext.cs
- GridEntryCollection.cs
- externdll.cs
- UserInitiatedRoutedEventPermission.cs
- ThreadSafeList.cs
- TileBrush.cs
- StreamWriter.cs
- TraceProvider.cs
- ContentTextAutomationPeer.cs
- PerfCounters.cs
- AutomationPatternInfo.cs
- SqlCacheDependencySection.cs
- WindowsUpDown.cs
- WsdlInspector.cs
- ParserContext.cs
- GridViewCommandEventArgs.cs
- RouteValueDictionary.cs
- SqlConnectionHelper.cs
- OLEDB_Enum.cs
- ContextMenu.cs
- TranslateTransform.cs
- DesignerValidatorAdapter.cs
- TdsParserStateObject.cs
- TableStyle.cs
- OpenFileDialog.cs
- XPathNode.cs
- XmlSchemaAttributeGroupRef.cs
- ClosureBinding.cs
- ProgressiveCrcCalculatingStream.cs
- PageThemeBuildProvider.cs
- Stream.cs
- Binding.cs
- SqlDataSourceFilteringEventArgs.cs
- ControlBuilderAttribute.cs
- Math.cs
- ColorConvertedBitmapExtension.cs
- DataRowView.cs
- CounterCreationDataCollection.cs
- GuidTagList.cs
- ContainerVisual.cs
- ModelService.cs
- BooleanAnimationUsingKeyFrames.cs
- OrCondition.cs
- ShutDownListener.cs
- VideoDrawing.cs
- ProviderSettingsCollection.cs
- NullableIntAverageAggregationOperator.cs
- DoubleCollectionValueSerializer.cs
- XamlTypeMapper.cs
- regiisutil.cs
- PenLineCapValidation.cs
- ResourceWriter.cs
- KeyGesture.cs
- NestPullup.cs
- VsPropertyGrid.cs
- ViewBase.cs
- EnumerableRowCollectionExtensions.cs
- StickyNoteAnnotations.cs
- ErrorReporting.cs
- TextDecoration.cs
- ConditionalAttribute.cs
- PenLineJoinValidation.cs
- QilTernary.cs
- DoubleLink.cs
- ToolboxItemFilterAttribute.cs
- PropertySegmentSerializer.cs
- ClientScriptManager.cs
- OleDbDataAdapter.cs
- mil_sdk_version.cs
- LogWriteRestartAreaState.cs
- CodeAttributeArgumentCollection.cs
- FlowchartSizeFeature.cs
- QilXmlWriter.cs
- PersonalizationStateQuery.cs
- BCLDebug.cs
- XmlHierarchyData.cs
- UnknownBitmapDecoder.cs
- TextTreeUndoUnit.cs
- SweepDirectionValidation.cs
- ConnectorDragDropGlyph.cs
- PrivilegedConfigurationManager.cs
- securitycriticaldataClass.cs
- MembershipSection.cs