473,382 Members | 1,424 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,382 software developers and data experts.

Kind of List? ...

Hello,

I need to pass to a function a list of items. Each item must include
to values:

1. Method (Enum Type)

2. Value (String)

I was using:

Dim myItems As New Dictionary(Of String,
Validation.RegularExpression)

With myItems
'.Add("hello", Type.NotEmpty)
'.Add("sd***@nasdsd.com", Type.Email)
End With

The problem with this is that I can send two items with same value,
for example

Dim myItems As New Dictionary(Of String,
Validation.RegularExpression)

With myItems
'.Add("sd***@nasdsd.com", Type.NotEmpty)
'.Add("sd***@nasdsd.com", Type.Email)
End With

How can I solve this problem?

Maybe I should use other type of object to send to my function.

Any idea?

Thanks,

Miguel

Mar 2 '07 #1
1 914
It sounds like you need a NameValueCollection; a specialized collection that
allows duplicate keys.

http://msdn2.microsoft.com/en-us/lib...ollection.aspx

-dl
---
David Longnecker
Web Developer
http://blog.tiredstudent.com
Hello,

I need to pass to a function a list of items. Each item must include
to values:

1. Method (Enum Type)

2. Value (String)

I was using:

Dim myItems As New Dictionary(Of String,
Validation.RegularExpression)
With myItems
'.Add("hello", Type.NotEmpty)
'.Add("sd***@nasdsd.com", Type.Email)
End With
The problem with this is that I can send two items with same value,
for example

Dim myItems As New Dictionary(Of String,
Validation.RegularExpression)
With myItems
'.Add("sd***@nasdsd.com", Type.NotEmpty)
'.Add("sd***@nasdsd.com", Type.Email)
End With
How can I solve this problem?

Maybe I should use other type of object to send to my function.

Any idea?

Thanks,

Miguel

Mar 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Lenard Lindstrom | last post by:
I was wondering if anyone has suggested having Python determine a method's kind from its first parameter. 'self' is a de facto reserved word; 'cls' is a good indicator of a class method ( __new__...
2
by: Joh | last post by:
Hello, (sorry long) i think i have missed something in the code below, i would like to design some kind of detector with python, but i feel totally in a no way now and need some advices to...
39
by: Holly | last post by:
I'm trying to validate my code and I can't figure out what kind of doctype I have. The validator can't tell me anything because it can't move beyond the doctype declaration. ...
1
by: Henro V | last post by:
I am byuilding this database which (among others things) will have to produce a kind of calendar. Users give in the appointments they have and how long they take. F.e: John Doe is attending a...
9
by: gold | last post by:
Hello all, I want know abt wht kind of datastructures using both C & C++ internally. Some were said heap, others said tree anyone can explain brief?
17
by: Anoob | last post by:
Can we consider () unary operator when calling a function, in exps eq. f(), ( 1 + 2). But when we call function f( 10 ) it is a binary operator. Even if we pass f( 10, 20) as we are using ,...
3
by: Samuel R. Neff | last post by:
DTE.ActiveDocument.Kind returns a guid as a string. I couldn't find any list of what pre-defined GUIDs would be returned and what document types they correspond to. Is there a list available? ...
13
by: ANSHUL | last post by:
PLEASE PROVIDE ME D SOLUTION CODE FOR DIS PROBLEM. SELECTION SORT IS BASED ON D FOLLOWING IDEA: SELECTING D LARGEST ARRAY ELEMENT AND SWAPPING IT WITH THE LAST ARRAY ELEMENT LEAVES AN UNSORTED...
4
by: Tony Johansson | last post by:
Hello! What actually does this sentence mean? Create a linked-list generic class that enables you to create a chain of different objects types. When I create a linked-list generic class for...
5
by: josh001 | last post by:
This Error message pops up every time I run my program using Python Shell and won't open at all when I don't use Shell. Traceback (most recent call last): File "C:\Documents and...
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: 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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.