VB.Net by API/System.Collections/ICollection — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:51, 26 мая 2010
ICollection.CopyTo
Option Strict On
Imports System.Collections
Public Module modMain
Public Sub Main()
Dim airports As New Hashtable
airports.Add("S", "SSS")
airports.Add("X", "XXX")
airports.Add("D", "DDD")
airports.Add("R", "RRR")
Dim keys As ICollection = airports.Keys
Dim keysArray(airports.Count - 1) As String
keys.CopyTo(keysArray, 0)
Array.Sort(keysArray)
For Each key As String in KeysArray
Console.WriteLine("{0} is {1}", key, airports(key))
Next
End Sub
End Module