Test for empty System.Collections.Specialized.NameValueCollection

  • Thread starter Thread starter Phil C.
  • Start date Start date
P

Phil C.

Hi.

I need to translate the C# statement:
if( this.validatorAssignments != null &&
this.validatorAssignments.HasKeys() )
where validatorAssignments is an instance of
System.Collections.Specialized.NameValueCollection

into VB.Net

I have no clue how to test how the collection is null (empty) except to say:

If ( (Me.validatorAssignments.Count > 1) And
(Me.validatorAssignments.HasKeys() = True) )

Thanks,

Phil
Boston, MA
 
If Not (Me.validatorAssignments Is Nothing) AndAlso
Me.validatorAssignments.HasKeys()
 
Pil
if( this.validatorAssignments != null &&
this.validatorAssignments.HasKeys() )
If ( (Me.validatorAssignments.Count > 1) And
(Me.validatorAssignments.HasKeys() = True) )
\\\
If Not validatorAssingnments Is Nothing AndAlso ValidatorAssignments.HasKeys
///

I hope this helps,

Cor
 
Thanks Guys for the help




Cor Ligthert said:
Pil

\\\
If Not validatorAssingnments Is Nothing AndAlso
ValidatorAssignments.HasKeys
///

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top