vb System.Collections.Specialized.CollectionsUtil.CreateCaseInsensitiveSortedList类(方法)实例源码

下面列出了vb System.Collections.Specialized.CollectionsUtil.CreateCaseInsensitiveSortedList 类(方法)源码代码实例,从而了解它的用法。

作者:VB程序    项目:System.Collections.Specialize   
' 导入命名空间
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


问题


面经


文章

微信
公众号

扫码关注公众号