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
- ColorAnimationUsingKeyFrames.cs
- StringToken.cs
- ThreadAbortException.cs
- MarkupWriter.cs
- HtmlInputPassword.cs
- VectorValueSerializer.cs
- TextCharacters.cs
- DataKeyCollection.cs
- BitmapSourceSafeMILHandle.cs
- KeyGestureConverter.cs
- ProfileModule.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- AttributeCollection.cs
- ToolStripDropDownClosedEventArgs.cs
- MethodSet.cs
- EventLogEntry.cs
- MouseWheelEventArgs.cs
- HierarchicalDataSourceControl.cs
- GenericEnumerator.cs
- TraceUtils.cs
- XamlVector3DCollectionSerializer.cs
- IdentitySection.cs
- FileDialogCustomPlacesCollection.cs
- SqlConnection.cs
- MetadataArtifactLoaderFile.cs
- FontUnitConverter.cs
- DataGridViewButtonCell.cs
- TempFiles.cs
- ClientTargetCollection.cs
- ValidatorCompatibilityHelper.cs
- TypeSystem.cs
- FacetChecker.cs
- StylusPointPropertyUnit.cs
- XmlSchemaInclude.cs
- Compensation.cs
- KeyValueSerializer.cs
- AxisAngleRotation3D.cs
- ParallelTimeline.cs
- OSFeature.cs
- WebServiceTypeData.cs
- EntityObject.cs
- HttpRequestCacheValidator.cs
- ClientCredentialsSecurityTokenManager.cs
- mda.cs
- Path.cs
- DefaultParameterValueAttribute.cs
- NativeMethods.cs
- URLString.cs
- AssemblyResolver.cs
- GridViewRowCollection.cs
- CompositeActivityMarkupSerializer.cs
- templategroup.cs
- BufferedGraphics.cs
- ProfileSettingsCollection.cs
- DoubleLinkList.cs
- BasePattern.cs
- SimpleType.cs
- PageMediaSize.cs
- HostingEnvironmentException.cs
- Unit.cs
- TextContainerHelper.cs
- DataReaderContainer.cs
- Util.cs
- Version.cs
- SchemaTableColumn.cs
- DateTimeOffsetAdapter.cs
- AnnotationObservableCollection.cs
- SimpleRecyclingCache.cs
- CodeAttachEventStatement.cs
- ConfigurationManagerInternalFactory.cs
- XmlDocument.cs
- TreeNodeStyle.cs
- CanExecuteRoutedEventArgs.cs
- CommandLibraryHelper.cs
- TextPointer.cs
- CodePageEncoding.cs
- AxWrapperGen.cs
- TraceShell.cs
- TraceXPathNavigator.cs
- UpdateEventArgs.cs
- ColumnReorderedEventArgs.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- ErrorInfoXmlDocument.cs
- StringCollection.cs
- Operator.cs
- DigestTraceRecordHelper.cs
- SecurityTokenAuthenticator.cs
- CellParaClient.cs
- SvcMapFileLoader.cs
- EventHandlerList.cs
- RelationshipConverter.cs
- TextMarkerSource.cs
- SyntaxCheck.cs
- TrackingParameters.cs
- CommandPlan.cs
- CopyCodeAction.cs
- SecurityStandardsManager.cs
- HttpAsyncResult.cs
- XamlToRtfWriter.cs
- IntellisenseTextBox.designer.cs