/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/class1.vb
37 строк
1 KB
Genevieve Warren
Move member remarks (#39270)
30 янв 2024, 00:43
Не верифицирован
30 янв 2024, 00:43
6c88824
Код
Авторство
О чём код?
' Visual Basic .NET Document Option Strict On ' <Snippet1> Imports System.Collections Imports System.Resources Module Example2 Public Sub Main() Console.WriteLine("Resources in ApplicationResources.resources:") Dim res As New ResourceReader(".\ApplicationResources.resources") Dim dict As IDictionaryEnumerator = res.GetEnumerator() Do While dict.MoveNext() Console.WriteLine(" {0}: '{1}' (Type {2})", dict.Key, dict.Value, dict.Value.GetType().Name) Loop res.Close() End Sub End Module ' The example displays output like the following: ' Resources in ApplicationResources.resources: ' Label3: '"Last Name:"' (Type String) ' Label2: '"Middle Name:"' (Type String) ' Label1: '"First Name:"' (Type String) ' Label7: '"State:"' (Type String) ' Label6: '"City:"' (Type String) ' Label5: '"Street Address:"' (Type String) ' Label4: '"SSN:"' (Type String) ' Label9: '"Home Phone:"' (Type String) ' Label8: '"Zip Code:"' (Type String) ' Title: '"Contact Information"' (Type String) ' Label12: '"Other Phone:"' (Type String) ' Label13: '"Fax:"' (Type String) ' Label10: '"Business Phone:"' (Type String) ' Label11: '"Mobile Phone:"' (Type String) ' Label14: '"Email Address:"' (Type String) ' Label15: '"Alternate Email Address:"' (Type String) ' </Snippet1>