Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DisplayNameAttribute.cs / 1 / DisplayNameAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Class | AttributeTargets.Method)] public class DisplayNameAttribute : Attribute { ///Specifies the display name for a property or event. The default is the name of the property or event. ////// public static readonly DisplayNameAttribute Default = new DisplayNameAttribute(); private string _displayName; ///Specifies the default value for the ///, which is an /// empty string (""). This field is read-only. /// public DisplayNameAttribute() : this (string.Empty) { } ///[To be supplied.] ////// public DisplayNameAttribute(string displayName) { this._displayName = displayName; } ///Initializes a new instance of the ///class. /// public virtual string DisplayName { get { return DisplayNameValue; } } ///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 DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } DisplayNameAttribute other = obj as DisplayNameAttribute; return (other != null) && other.DisplayName == DisplayName; } public override int GetHashCode() { return DisplayName.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- dataSvcMapFileLoader.cs
- ConfigXmlText.cs
- SecurityContext.cs
- SkinBuilder.cs
- SecurityRuntime.cs
- TimeoutException.cs
- ListInitExpression.cs
- ImageCodecInfoPrivate.cs
- Configuration.cs
- ProcessModelSection.cs
- XmlIlTypeHelper.cs
- RootBuilder.cs
- XmlFormatReaderGenerator.cs
- ComponentDispatcher.cs
- ComAdminInterfaces.cs
- OwnerDrawPropertyBag.cs
- WorkflowMarkupSerializationException.cs
- ParameterModifier.cs
- MimeFormatter.cs
- ToolBarButton.cs
- ParameterBuilder.cs
- Queue.cs
- LoginCancelEventArgs.cs
- ParserStreamGeometryContext.cs
- DockAndAnchorLayout.cs
- HtmlInputRadioButton.cs
- GeometryHitTestParameters.cs
- VariantWrapper.cs
- ASCIIEncoding.cs
- WebPartExportVerb.cs
- ClientBuildManager.cs
- SpeechRecognitionEngine.cs
- FileSystemInfo.cs
- EntityViewContainer.cs
- FileLogRecord.cs
- RelationHandler.cs
- CodeStatementCollection.cs
- TypeExtensionConverter.cs
- ConnectionConsumerAttribute.cs
- PopupRoot.cs
- AutomationPatternInfo.cs
- WebPermission.cs
- TableHeaderCell.cs
- Console.cs
- CacheForPrimitiveTypes.cs
- controlskin.cs
- MarkupCompiler.cs
- PropertySourceInfo.cs
- Error.cs
- RuntimeCompatibilityAttribute.cs
- CultureTable.cs
- RoutedEventHandlerInfo.cs
- x509store.cs
- SqlCachedBuffer.cs
- COM2AboutBoxPropertyDescriptor.cs
- StateDesigner.Layouts.cs
- SerializationInfoEnumerator.cs
- DispatcherProcessingDisabled.cs
- CasesDictionary.cs
- ISAPIApplicationHost.cs
- MinMaxParagraphWidth.cs
- Util.cs
- ExclusiveCanonicalizationTransform.cs
- AuthorizationRule.cs
- ClaimTypes.cs
- CharEntityEncoderFallback.cs
- XsltException.cs
- CodeComment.cs
- SHA256.cs
- PostBackOptions.cs
- SqlClientMetaDataCollectionNames.cs
- XpsImageSerializationService.cs
- SQLDateTimeStorage.cs
- Window.cs
- hwndwrapper.cs
- DataRecordInternal.cs
- KeyPressEvent.cs
- TypeReference.cs
- HttpDigestClientElement.cs
- safePerfProviderHandle.cs
- errorpatternmatcher.cs
- DbProviderFactoriesConfigurationHandler.cs
- Condition.cs
- BeginGetFileNameFromUserRequest.cs
- DBSchemaTable.cs
- ReferenceEqualityComparer.cs
- CollectionChange.cs
- SplashScreenNativeMethods.cs
- TagPrefixAttribute.cs
- BitmapFrame.cs
- BackEase.cs
- Helper.cs
- VectorConverter.cs
- SqlException.cs
- AspNetCompatibilityRequirementsAttribute.cs
- HtmlContainerControl.cs
- RequestCachingSection.cs
- SymbolDocumentInfo.cs
- WorkflowWebHostingModule.cs
- ExpressionTable.cs