本文整理匯總了VB.NET中System.Resources.ResourceManager.GetResourceSet方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET ResourceManager.GetResourceSet方法的具體用法?VB.NET ResourceManager.GetResourceSet怎麽用?VB.NET ResourceManager.GetResourceSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Resources.ResourceManager
的用法示例。
在下文中一共展示了ResourceManager.GetResourceSet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Example
' 導入命名空間
Imports System.Globalization
Imports System.Resources
Module Example
Public Sub Main()
Dim numbers() As String = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" }
Dim rm As New ResourceManager(GetType(NumberResources))
Dim rs As ResourceSet = rm.GetResourceSet(CultureInfo.CreateSpecificCulture("fr-FR"), True, False)
If rs Is Nothing Then Console.WriteLine("No resource set.") : Exit Sub
For Each number In numbers
Console.WriteLine("{0,-10} '{1}'", number + ":", rs.GetString(number))
Next
End Sub
End Module
Public Class NumberResources
End Class
輸出:
one: 'un' two: 'deux' three: 'trois' four: 'quatre' five: '' six: '' seven: '' eight: '' nine: '' ten: ''