我想在vb.net中对Keyvluepair列表的值进行排序 这是c#示例正在运行,
static int Compare1(KeyValuePair<string, string> a, KeyValuePair<string, string> b)
{
return a.Key.CompareTo(b.Key);
}
postparamslist.Sort(Compare1);
但是在vb中它不起作用: -
Public Function Compare1(ByVal a As KeyValuePair(Of String, String), ByVal b As KeyValuePair(Of String, String)) As Integer
Return a.Key.CompareTo(b.Key)
End Function