473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Test for empty System.Collections.Specialized.NameValueCollection

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
3 4001
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Todd Hampton | last post by:
I'm trying to write a small app that will screen scrape jobs from the Hire Texas site but have not been able to post to the search criteria page. Anybody have any insights? Thanks, Todd Dim...
4
by: Justin Malloy | last post by:
I am using the System.Net.Webclient to try and download an XML file from a website but am receiving a HTTP protocol error when running the DownloadFile() sub routine. I did a HTTP trace using...
0
by: Jim Douglas | last post by:
{System.Collections.Specialized.ListDictionary.NodeKeyValueCollection} : {System.Collections.Specialized.ListDictionary.NodeKeyValueCollection} Count: 25 ?entry.Contains("MachineName") ...
1
by: Rein Petersen | last post by:
Hi Everyone! I hope someone may have experience serializing a NameObjectCollectionBase (System.Collections.Specialized) and can advise me as to why I receive this error (below) when I try to...
1
by: Mark Miller | last post by:
I just recently started getting the above error on a page I am posting MULTIPART/FORM-DATA. We have SoftArtisans FileUp component and Filter installed on the server in question and up until a day...
0
by: Hazzard | last post by:
I am trying to figure out how to add an additional value to a querystring collection so that when I click on a datagrid cell, there will be a key to distinguish it from another column's...
1
by: jmhmaine | last post by:
I've used the WebClient class on a few projects but I wanted to know if anyone could point to the good resource for Best Practices with this object. The two things I haven't seen in sample code...
0
by: John Grandy | last post by:
My business-layer class has a method that returns a System.Collections.Specialized.NameValueCollection I wrapped this business-layer class in a Web Service. In an ASP.NET project, when I...
0
by: fero | last post by:
Hello, I have the following problem. I have a page which works fine. But sometimes I see the following error in error log: -- Message: System.Web.HttpUnhandledException: Exception of type...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.