SRDisplayNameAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / SRDisplayNameAttribute.cs / 1 / SRDisplayNameAttribute.cs

                            //------------------------------------------------------------------------------ 
// 
//    Copyright (c) Microsoft Corporation. All Rights Reserved.
//    Information Contained Herein is Proprietary and Confidential.
//  
//-----------------------------------------------------------------------------
 
namespace System.Windows.Forms.Design { 
    using System;
    using System.ComponentModel; 
    using System.Design;

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Class | AttributeTargets.Method)]
    internal sealed class SRDisplayNameAttribute : DisplayNameAttribute { 

        private bool replaced = false; 
 
        /// 
        ///     Constructs a new sys display name. 
        /// 
        /// 
        ///     description text.
        ///  
        public SRDisplayNameAttribute(string displayName) : base(displayName) {
        } 
 
        /// 
        ///     Retrieves the description text. 
        /// 
        /// 
        ///     description
        ///  
        public override string DisplayName {
            get { 
                if (!replaced) { 
                    replaced = true;
                    DisplayNameValue = SR.GetString(base.DisplayName); 
                }
                return base.DisplayName;
            }
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK