NameValueCollection

Hi experts,

How to check if a given key is existed in a NameValueCollection or not?

Thanks!
kennysflauAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
manchConnect With a Mentor Commented:

Dim obj as Collection
Dim found as boolean = false

obj = New Collection

found = obj.Contains("KeyUWant to Check")
0
 
AlexFMConnect With a Mentor Commented:
Dim c as NameValueCollection
Dim key as String
...

if ( not c(key) is nothing ) then
    ' key exists
end if
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.