S
shapper
Hello,
I am having some problems in looping through each item in
NameValueCollection:
1 Dim a As New NameValueCollection
2 a.Add("My String", City.NewYork)
3 a.Add("My String", City.Paris)
4 a.Add("My String", City.London)
5
6 For Each b As KeyValuePair(Of String, City) In a
7 Response.Write(a.Key)
8 Response.Write(a.Value)
9 Next b
I get an error on code line 6:
"Specified cast is not valid."
What am I doing wrong?
Thanks,
Miguel
I am having some problems in looping through each item in
NameValueCollection:
1 Dim a As New NameValueCollection
2 a.Add("My String", City.NewYork)
3 a.Add("My String", City.Paris)
4 a.Add("My String", City.London)
5
6 For Each b As KeyValuePair(Of String, City) In a
7 Response.Write(a.Key)
8 Response.Write(a.Value)
9 Next b
I get an error on code line 6:
"Specified cast is not valid."
What am I doing wrong?
Thanks,
Miguel