Results 1 to 4 of 4

Thread: HashTable error in VB.NET

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    12

    HashTable error in VB.NET

    Hi,

    """" I am getting the error Item has already been added. Key in Dictionary "0". Key being Added "0". """"

    From form i have loaded a series of numbers to Class1. In Class1 i am using HashTable to store the values.

    Then i am passing the values from Class1 to Class2 for doing some operations. Here also in Class2 i am stroing the values in HashTable.

    But getting the above error while debugging.

    Please Advice.

    Thanx in Advance.

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    a hashtable can't contain one more equal key

    for example you can't add 2 keys saying "keytwo"
    \m/\m/

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    12
    So how to get around this problem.

    How can i take say 10 numbers out of a series of 100 numbers stored in a Hashtable in Class1 and do some mathematical operation (the operational logic is in Class2).

    Or is there any better way of doing it?

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    i didnt quite get what you meant.
    why can't you use a regular array? or a collection?
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width