Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DescriptionAttribute.cs / 1305376 / 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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(); } #if !SILVERLIGHT ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } #endif } } // 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
- CodeAccessSecurityEngine.cs
- ComNativeDescriptor.cs
- SiteMapProvider.cs
- TimeoutValidationAttribute.cs
- OleDbRowUpdatingEvent.cs
- HttpEncoderUtility.cs
- SerializationEventsCache.cs
- AlternateView.cs
- TdsRecordBufferSetter.cs
- RepeaterItemCollection.cs
- Parsers.cs
- TextEditor.cs
- GAC.cs
- PointHitTestParameters.cs
- FunctionDetailsReader.cs
- _HTTPDateParse.cs
- Range.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- UpdateTranslator.cs
- XmlUtil.cs
- Semaphore.cs
- HttpVersion.cs
- WebEventTraceProvider.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- CustomGrammar.cs
- WebPartHeaderCloseVerb.cs
- ResizeGrip.cs
- DebugViewWriter.cs
- AsyncPostBackErrorEventArgs.cs
- PartManifestEntry.cs
- DesignerActionUIService.cs
- DefaultValueConverter.cs
- ContainerUIElement3D.cs
- XmlILModule.cs
- GraphicsPath.cs
- MetadataImporterQuotas.cs
- ValueSerializerAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- TaiwanLunisolarCalendar.cs
- EventDescriptorCollection.cs
- GC.cs
- SqlParameter.cs
- WindowVisualStateTracker.cs
- PageBreakRecord.cs
- ToolboxComponentsCreatedEventArgs.cs
- HtmlInputRadioButton.cs
- CodeArgumentReferenceExpression.cs
- TableSectionStyle.cs
- MinimizableAttributeTypeConverter.cs
- Fx.cs
- RefExpr.cs
- NullableConverter.cs
- ByteStorage.cs
- NativeBuffer.cs
- ApplicationDirectory.cs
- NestedContainer.cs
- ListViewInsertionMark.cs
- HostingEnvironmentException.cs
- ProbeDuplexCD1AsyncResult.cs
- Blend.cs
- DataGridViewLayoutData.cs
- XmlSerializationReader.cs
- ConstructorArgumentAttribute.cs
- QualificationDataItem.cs
- ContractValidationHelper.cs
- FormViewUpdatedEventArgs.cs
- ParserHooks.cs
- SortQueryOperator.cs
- LinqDataSourceView.cs
- TrustLevelCollection.cs
- StylusPointPropertyId.cs
- WindowsIdentity.cs
- ProfileSettingsCollection.cs
- HtmlValidatorAdapter.cs
- ResourceDictionaryCollection.cs
- BufferedGraphicsManager.cs
- OutputCacheSettings.cs
- DockProviderWrapper.cs
- DoubleLinkListEnumerator.cs
- BulletChrome.cs
- MD5.cs
- RegularExpressionValidator.cs
- ObjectConverter.cs
- PeerName.cs
- CompilerParameters.cs
- SchemaTableColumn.cs
- HashJoinQueryOperatorEnumerator.cs
- Oid.cs
- IgnoreFileBuildProvider.cs
- FormsAuthenticationTicket.cs
- filewebrequest.cs
- ExpressionsCollectionEditor.cs
- ListViewCancelEventArgs.cs
- TemplateComponentConnector.cs
- ListViewHitTestInfo.cs
- CacheChildrenQuery.cs
- FormView.cs
- WorkflowInstanceSuspendedRecord.cs
- GridViewUpdatedEventArgs.cs
- DataGridHeaderBorder.cs