VB.Net by API/System.Collections.Generic/KeyValuePair — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:50, 26 мая 2010
KeyValuePair.Value
Imports System.Collections.Generic
Public Class GenericTest
Public Shared Sub Main()
Dim education As New Dictionary(Of String, String)
education.Add("BA", "Bachelor of Arts")
education.Add("BS", "Bachelor of Science")
education.Add("MA", "Master of Arts")
education.Add("MS", "Master of Science")
education.Add("MPhil", "Master of Philosophy")
education.Add("PhD", "Doctor of Philosophy")
Console.WriteLine(education.Item("BS"))
Console.WriteLine()
For Each pair As KeyValuePair(Of String, String) In education
Console.WriteLine(pair.Value)
Next
End Sub
End Class