本文整理汇总了VB.NET中System.Globalization.CultureAndRegionInfoBuilder.CultureNativeName属性的典型用法代码示例。如果您正苦于以下问题:VB.NET CultureAndRegionInfoBuilder.CultureNativeName属性的具体用法?VB.NET CultureAndRegionInfoBuilder.CultureNativeName怎么用?VB.NET CultureAndRegionInfoBuilder.CultureNativeName使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Globalization.CultureAndRegionInfoBuilder
的用法示例。
在下文中一共展示了CultureAndRegionInfoBuilder.CultureNativeName属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Sample
' This example demonstrates a System.Globalization.Culture-
' AndRegionInfoBuilder constructor and some of the properties
' of the CultureAndRegionInfoBuilder object that is created.
' Compile this example with a reference to sysglobl.dll.
Imports System.Globalization
Class Sample
Public Shared Sub Main()
' Construct a new, privately used culture that extends the en-US culture
' provided by the .NET Framework. In this sample, the CultureAndRegion-
' Types.Specific parameter creates a minimal CultureAndRegionInfoBuilder
' object that you must populate with culture and region information.
Dim cib As CultureAndRegionInfoBuilder = Nothing
Try
cib = New CultureAndRegionInfoBuilder("x-en-US-sample", _
CultureAndRegionModifiers.None)
Catch ae As ArgumentException
Console.WriteLine(ae)
Return
End Try
' Populate the new CultureAndRegionInfoBuilder object with culture information.
Dim ci As New CultureInfo("en-US")
cib.LoadDataFromCultureInfo(ci)
' Populate the new CultureAndRegionInfoBuilder object with region information.
Dim ri As New RegionInfo("US")
cib.LoadDataFromRegionInfo(ri)
' Display some of the properties for the x-en-US-sample custom culture.
Console.Clear()
Console.WriteLine("CultureName:. . . . . . . . . . {0}", cib.CultureName)
Console.WriteLine("CultureEnglishName: . . . . . . {0}", cib.CultureEnglishName)
Console.WriteLine("CultureNativeName:. . . . . . . {0}", cib.CultureNativeName)
Console.WriteLine("GeoId:. . . . . . . . . . . . . {0}", cib.GeoId)
Console.WriteLine("IsMetric: . . . . . . . . . . . {0}", cib.IsMetric)
Console.WriteLine("ISOCurrencySymbol:. . . . . . . {0}", cib.ISOCurrencySymbol)
Console.WriteLine("RegionEnglishName:. . . . . . . {0}", cib.RegionEnglishName)
Console.WriteLine("RegionName: . . . . . . . . . . {0}", cib.RegionName)
Console.WriteLine("RegionNativeName: . . . . . . . {0}", cib.RegionNativeName)
Console.WriteLine("ThreeLetterISOLanguageName: . . {0}", cib.ThreeLetterISOLanguageName)
Console.WriteLine("ThreeLetterISORegionName: . . . {0}", cib.ThreeLetterISORegionName)
Console.WriteLine("ThreeLetterWindowsLanguageName: {0}", cib.ThreeLetterWindowsLanguageName)
Console.WriteLine("ThreeLetterWindowsRegionName: . {0}", cib.ThreeLetterWindowsRegionName)
Console.WriteLine("TwoLetterISOLanguageName: . . . {0}", cib.TwoLetterISOLanguageName)
Console.WriteLine("TwoLetterISORegionName: . . . . {0}", cib.TwoLetterISORegionName)
End Sub
End Class
开发者ID:VB.NET开发者,项目名称:System.Globalization,代码行数:55,代码来源:CultureAndRegionInfoBuilder.CultureNativeName
输出:
CultureName:. . . . . . . . . . x-en-US-sample CultureEnglishName: . . . . . . English CultureNativeName:. . . . . . . English GeoId:. . . . . . . . . . . . . 244 IsMetric: . . . . . . . . . . . False ISOCurrencySymbol:. . . . . . . USD RegionEnglishName:. . . . . . . United States RegionName: . . . . . . . . . . US RegionNativeName: . . . . . . . United States ThreeLetterISOLanguageName: . . eng ThreeLetterISORegionName: . . . USA ThreeLetterWindowsLanguageName: ENU ThreeLetterWindowsRegionName: . USA TwoLetterISOLanguageName: . . . en TwoLetterISORegionName: . . . . US