By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

Test for empty System.Collections.Specialized.NameValueCollection

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If Not (Me.validatorAssignments Is Nothing) AndAlso
Me.validatorAssignments.HasKeys()
"Phil C." <ch********@rcn.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
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

Nov 21 '05 #2

P: n/a
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
Nov 21 '05 #3

P: n/a
Thanks Guys for the help


"Cor Ligthert" <no************@planet.nl> wrote in message
news:O5*************@TK2MSFTNGP09.phx.gbl...
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

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.