L
Laszlo Szijarto
Thank you in advance,
I am trying to populate a HashTable object with a value that's an array, but
I don't want to put in two lines of code for each entry.
rather than saying
int[] value = {1,2,3};
hashTable.Add("test",value);
is there any way to combine this into one line
I've tried
hashTable.Add("test",(int[]){1,2,3});
hashTable.Add("test",new int[] = {1,2,3});
hashTable.Add("test",int[] testvalue = {1,2,3};
none of these compiles. Is there any way to declare and define an array
inline?
Thank you,
Laszlo
I am trying to populate a HashTable object with a value that's an array, but
I don't want to put in two lines of code for each entry.
rather than saying
int[] value = {1,2,3};
hashTable.Add("test",value);
is there any way to combine this into one line
I've tried
hashTable.Add("test",(int[]){1,2,3});
hashTable.Add("test",new int[] = {1,2,3});
hashTable.Add("test",int[] testvalue = {1,2,3};
none of these compiles. Is there any way to declare and define an array
inline?
Thank you,
Laszlo