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
- ListParagraph.cs
- LineBreakRecord.cs
- FloaterParagraph.cs
- ClientUtils.cs
- ISCIIEncoding.cs
- NegationPusher.cs
- PermissionSetTriple.cs
- HttpStreamXmlDictionaryWriter.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- DBSchemaTable.cs
- SqlException.cs
- _Semaphore.cs
- ReadWriteObjectLock.cs
- MenuItemStyleCollectionEditor.cs
- StorageEndPropertyMapping.cs
- RegexWriter.cs
- QilParameter.cs
- SqlInternalConnection.cs
- Timer.cs
- DataTransferEventArgs.cs
- OleDbRowUpdatedEvent.cs
- DataGridViewColumnHeaderCell.cs
- Codec.cs
- ParentUndoUnit.cs
- ApplicationDirectory.cs
- XmlSchemaProviderAttribute.cs
- EncoderFallback.cs
- Adorner.cs
- WebZone.cs
- _BaseOverlappedAsyncResult.cs
- ConfigurationElementCollection.cs
- SamlSecurityTokenAuthenticator.cs
- RotateTransform3D.cs
- _LoggingObject.cs
- DeviceFilterDictionary.cs
- Font.cs
- EntityDescriptor.cs
- WebPartDescription.cs
- Grant.cs
- PipeStream.cs
- Literal.cs
- ToolTipService.cs
- ArraySegment.cs
- OracleLob.cs
- BridgeDataReader.cs
- CodeIterationStatement.cs
- SystemBrushes.cs
- SystemMulticastIPAddressInformation.cs
- TreeViewAutomationPeer.cs
- Keywords.cs
- ExpressionList.cs
- BindingCollection.cs
- DataPager.cs
- FreeFormDesigner.cs
- TabletDevice.cs
- SessionSwitchEventArgs.cs
- Brush.cs
- ASCIIEncoding.cs
- DataSourceGroupCollection.cs
- TreeNode.cs
- FormDocumentDesigner.cs
- XXXInfos.cs
- HideDisabledControlAdapter.cs
- SqlCacheDependencyDatabase.cs
- MenuAdapter.cs
- ExceptionRoutedEventArgs.cs
- ExternalFile.cs
- ConfigurationValidatorAttribute.cs
- WebBrowser.cs
- GregorianCalendarHelper.cs
- BaseParser.cs
- GradientStop.cs
- PrintDialog.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- AttachedPropertyDescriptor.cs
- FontFamilyIdentifier.cs
- ViewStateChangedEventArgs.cs
- SafeHandle.cs
- ReadOnlyAttribute.cs
- FormViewInsertEventArgs.cs
- DirectionalLight.cs
- PeerNameRegistration.cs
- ResourceProviderFactory.cs
- BitmapEffectInputData.cs
- DataGridPagerStyle.cs
- SmtpAuthenticationManager.cs
- ExtendedProperty.cs
- Rectangle.cs
- UTF32Encoding.cs
- RowUpdatedEventArgs.cs
- DataContext.cs
- Int64Animation.cs
- ResolveDuplexAsyncResult.cs
- ChangeNode.cs
- StringUtil.cs
- CachedCompositeFamily.cs
- LineSegment.cs
- ColorConverter.cs
- QilExpression.cs
- ObjectConverter.cs