VB.Net by API/System.Collections.Specialized/CollectionsUtil — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 16:40, 26 мая 2010
CollectionsUtil.CreateCaseInsensitiveSortedList
Imports System.Collections.Specialized
Imports System.Collections
public class Test
public Shared Sub Main
Dim sorted_list As SortedList
" Use a normal, case-sensitive SortedList.
sorted_list = New SortedList
sorted_list.Add("Sport", "Volleyball")
sorted_list.Add("sport", "Golf") " Okay because Sport <> sport.
" Use a case-insensitive SortedList.
sorted_list = CollectionsUtil.CreateCaseInsensitiveSortedList()
sorted_list.Add("Sport", "Volleyball")
sorted_list.Add("sport", "Golf") " Error because Sport = sport.
End Sub
End class