PlatformCulture.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Base / MS / Internal / PlatformCulture.cs / 1 / PlatformCulture.cs

                            //------------------------------------------------------------------------ 
//
//  Microsoft Windows Client Platform
//  Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  File:  PlatformCulture.cs
// 
//  Contents: Internal class that exposes the culture the platform is localized to. 
//
//  Created:   5-19-2006  Rafael Ruiz (rruiz) 
//
//-----------------------------------------------------------------------

using System; 
using System.Globalization;
using System.Windows; 
using MS.Internal.WindowsBase; 

namespace MS.Internal 
{
    /// 
    /// Exposes the CultureInfo for the culture the platform is localized to.
    ///  
    [FriendAccessAllowed]
    internal static class PlatformCulture 
    { 
        /// 
        /// Culture the platform is localized to. 
        /// 
        public static CultureInfo Value
        {
            get 
            {
                // Get the UI Language from the string table 
                string uiLanguage = SR.Get(SRID.WPF_UILanguage); 
                Invariant.Assert(!string.IsNullOrEmpty(uiLanguage), "No UILanguage was specified in stringtable.");
 
                // Return the CultureInfo for this UI language.
                return new CultureInfo(uiLanguage);
            }
        } 

    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------ 
//
//  Microsoft Windows Client Platform
//  Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  File:  PlatformCulture.cs
// 
//  Contents: Internal class that exposes the culture the platform is localized to. 
//
//  Created:   5-19-2006  Rafael Ruiz (rruiz) 
//
//-----------------------------------------------------------------------

using System; 
using System.Globalization;
using System.Windows; 
using MS.Internal.WindowsBase; 

namespace MS.Internal 
{
    /// 
    /// Exposes the CultureInfo for the culture the platform is localized to.
    ///  
    [FriendAccessAllowed]
    internal static class PlatformCulture 
    { 
        /// 
        /// Culture the platform is localized to. 
        /// 
        public static CultureInfo Value
        {
            get 
            {
                // Get the UI Language from the string table 
                string uiLanguage = SR.Get(SRID.WPF_UILanguage); 
                Invariant.Assert(!string.IsNullOrEmpty(uiLanguage), "No UILanguage was specified in stringtable.");
 
                // Return the CultureInfo for this UI language.
                return new CultureInfo(uiLanguage);
            }
        } 

    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

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