Code:
/ 4.0 / 4.0 / untmp / 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;
///
/// Specifies a description for a property
/// or event.
///
[AttributeUsage(AttributeTargets.All)]
public class DescriptionAttribute : Attribute {
///
/// Specifies the default value for the , which is an
/// empty string (""). This field is read-only.
///
public static readonly DescriptionAttribute Default = new DescriptionAttribute();
private string description;
///
/// [To be supplied.]
///
public DescriptionAttribute() : this (string.Empty) {
}
///
/// Initializes a new instance of the class.
///
public DescriptionAttribute(string description) {
this.description = description;
}
///
/// Gets the description stored in this attribute.
///
public virtual string Description {
get {
return DescriptionValue;
}
}
///
/// 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
- TheQuery.cs
- SuppressMergeCheckAttribute.cs
- ResourceDisplayNameAttribute.cs
- StylusButtonEventArgs.cs
- EventRoute.cs
- DomainConstraint.cs
- DictionaryContent.cs
- ScopedKnownTypes.cs
- PropertyGridEditorPart.cs
- CheckoutException.cs
- ChameleonKey.cs
- InternalBase.cs
- TextUtf8RawTextWriter.cs
- XmlSchemaAnnotation.cs
- SynchronizedRandom.cs
- DataGridViewControlCollection.cs
- CompositeKey.cs
- XmlEnumAttribute.cs
- StatusBarPanelClickEvent.cs
- SelectionProviderWrapper.cs
- filewebresponse.cs
- AnnouncementInnerClient11.cs
- AutomationPropertyInfo.cs
- ImageBrush.cs
- DescendentsWalker.cs
- MemoryMappedView.cs
- EntityContainerEmitter.cs
- HtmlTitle.cs
- InplaceBitmapMetadataWriter.cs
- Base64Decoder.cs
- RowType.cs
- MouseEvent.cs
- QilLiteral.cs
- TypeTypeConverter.cs
- PageThemeBuildProvider.cs
- InvalidCommandTreeException.cs
- XsltContext.cs
- AssemblyEvidenceFactory.cs
- PageRanges.cs
- WindowsTreeView.cs
- WebPartHelpVerb.cs
- MatrixValueSerializer.cs
- MemoryMappedFileSecurity.cs
- ConnectionStringSettings.cs
- AppDomainAttributes.cs
- ZoneLinkButton.cs
- HttpServerVarsCollection.cs
- GcHandle.cs
- ProcessHostMapPath.cs
- SplineKeyFrames.cs
- MethodCallConverter.cs
- OdbcEnvironment.cs
- ReadOnlyNameValueCollection.cs
- LayoutManager.cs
- ClientFormsAuthenticationCredentials.cs
- KeyValueSerializer.cs
- remotingproxy.cs
- WorkflowInvoker.cs
- StaticResourceExtension.cs
- DataControlField.cs
- DispatchWrapper.cs
- XmlElement.cs
- ParamArrayAttribute.cs
- KnownTypesHelper.cs
- XamlStream.cs
- UnmanagedHandle.cs
- Rect3DValueSerializer.cs
- DynamicUpdateCommand.cs
- SqlRowUpdatingEvent.cs
- SmiSettersStream.cs
- DummyDataSource.cs
- ArgIterator.cs
- SimpleTableProvider.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- UnsafeNativeMethods.cs
- SHA256.cs
- XmlArrayItemAttribute.cs
- XmlSignificantWhitespace.cs
- ColumnReorderedEventArgs.cs
- FixedTextPointer.cs
- ValidationSummary.cs
- ZoneButton.cs
- CacheForPrimitiveTypes.cs
- EditorZone.cs
- CollectionViewGroup.cs
- DropDownList.cs
- UnauthorizedWebPart.cs
- WorkflowOperationAsyncResult.cs
- QuerySetOp.cs
- RangeValidator.cs
- ObjectPersistData.cs
- ToolBarButton.cs
- StyleCollection.cs
- TextBoxLine.cs
- KeyFrames.cs
- NetMsmqBindingElement.cs
- ColorAnimation.cs
- XmlDataDocument.cs
- ClickablePoint.cs
- EdmSchemaAttribute.cs