Hi John,
I think you can do something like this:
Hashtable ht=new Hashtable();
ht.Add('A',new byte[]{0,0,0,1,1});
ht.Add('B',new byte[]{1,1,0,0,1});
byte [] arr1=(byte[])ht['A'];
byte [] arr2=(byte[])ht['B'];
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From:
jo********@hotmail.com (John)
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Subject: How to build lookup table with an array as one of the elements?
| Date: 27 Oct 2003 11:49:10 -0800
| Organization:
http://groups.google.com
| Lines: 24
| Message-ID: <d8**************************@posting.google.com >
| NNTP-Posting-Host: 192.25.240.225
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1067284150 20939 127.0.0.1 (27 Oct 2003
19:49:10 GMT)
| X-Complaints-To:
gr**********@google.com
| NNTP-Posting-Date: Mon, 27 Oct 2003 19:49:10 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnew s1.google.com!no
t-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194480
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I need to build a BAUDOT lookup table for an encoder. I see to use a
| char as the index 'A' or 'B' and get back an array of booleans (five
| elements long).
|
| Baudot['A'] = {00011}
| Baudot['B'] = {11001}
|
| Can someone give me a pointer on how to build this as a static lookup
| table?
|
| Do I want an array of arrays?
|
| public static bool [][] = {'A', {0, 0, 0, 1, 1, 1} };
|
| This isn't right because an A is not a bool.
|
| Maybe an array of structures?
|
| How do I initiale the structure boolean array?
|
| Thanks,
| John
|