VB.Net by API/System.Collections.Specialized/CollectionsUtil — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 19:40, 26 мая 2010

CollectionsUtil.CreateCaseInsensitiveSortedList

<source lang="vbnet">

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


 </source>