2007-03-18, 10:28 PM
Ok I'm not a c# programmer...
This code was cut out of GbpvrUiElementsExamplePlugin source, and is probably a question for McBainUK since he wrote it.
Hashtable displayArgs = new Hashtable();
displayArgs["@animalName"] = animal1.Name;
displayArgs["@animalType"] = animal1.AnimalType;
customListExample.Add(displayArgs,animal1);
I understand what a hashtable is used for but I don't get what the line:
displayArgs["@animalName"] = animal1.Name;
is actually doing besides somehow intializing the index in the hashtable.
I know animal1.Name returns a string, but what does ["@animalName"] do?
And somehow the next line
displayArgs["@animalType"] = animal1.AnimalType;
Inits the value?
This code was cut out of GbpvrUiElementsExamplePlugin source, and is probably a question for McBainUK since he wrote it.
Hashtable displayArgs = new Hashtable();
displayArgs["@animalName"] = animal1.Name;
displayArgs["@animalType"] = animal1.AnimalType;
customListExample.Add(displayArgs,animal1);
I understand what a hashtable is used for but I don't get what the line:
displayArgs["@animalName"] = animal1.Name;
is actually doing besides somehow intializing the index in the hashtable.
I know animal1.Name returns a string, but what does ["@animalName"] do?
And somehow the next line
displayArgs["@animalType"] = animal1.AnimalType;
Inits the value?