How to create array of hash table with correct types



Hi,

I want to create an array of 3 hash tables that has a string key and a
NodeAddress value.

I tried the following, which does not compile:

private Hashtable<String, NodeAddress>[] cache = {new
Hashtable<String, NodeAddress>(),new Hashtable<String,
NodeAddress>()};

private Hashtable<String, NodeAddress>[] cache = new Hashtable<String,
NodeAddress>()[3];


Any help on the syntax to get it to work would be great.


Thanks.
Jon.
.



Relevant Pages

  • Re: How to create array of hash table with correct types
    ... I want to create an array of 3 hash tables that has a string key and a ... NodeAddress value. ...
    (comp.lang.java.help)
  • Re: Arent All MD5 Hashes the Same?
    ... string key = sb.ToString; ... so I was was running the hash on the hex representation of the data rather than the data itself. ... I don't consider what I did "error prone" as to the results produced by String.Format, it was just the wrong thing I should've been doing the hash on. ... Note that I didn't do it that way because it was easier: The entire API deals with hex representations of MD5 hash codes and I guess I assumed that this would be handled the same way. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: meta pre-processor
    ... If one source file is modified, the header has to be rebuilt since ... that takes hours to compile from scratch. ... for programmer time than incremental compiling, ... | when an interface has changed by a change in the hash. ...
    (comp.lang.c)
  • Re: C++ in embedded systems
    ... > high with a reasoable hash function since it probably dominates, ... > but I guess the difference could be tested by a hash function that runs ... Similarly the equivalent of constructors and destructors for the ... It should all compile out of the box. ...
    (comp.os.linux.embedded)
  • [SLE] Suse 9.1 & qtstalker
    ... Hash: SHA1 ... has anyone got this program to compile. ... Check the headers for your unsubscription address ...
    (SuSE)