C# Iterate through NameValueCollection

后端 未结 7 1797
慢半拍i
慢半拍i 2020-12-13 01:43

I have a NameValueCollection, and want to iterate through the values. Currently, I’m doing this, but it seems like there should be a neater way to do it:

7条回答
  •  旧巷少年郎
    2020-12-13 01:55

    I think this is simpler:

    For i As Integer = 0 To nvc.Count - 1
       Console.Write("No", "Key", "Value")
       Console.Write(i, nvc.GetKey(i), nvc.Get(i))
    Next
    

提交回复
热议问题