My HashTable (Global.Games) is a static collection of objects of type
Game. A Game object has 8 fields (exposed as properties). The key to
the HashTable is also one of these fields (GameID, of type int).
When I try to create a SortedList from the HashTable with the
following:
SortedList sortedGames = new SortedList(Glob al.Games);
I get an error message:
Argument '1': cannot convert from 'ChatMark1.Game HashTable' to 'int'
But the SortedList constructor is overloaded and one parameter it
accepts is an object of type Systems.Collect ion.IDictionary . Why does
it now expect the Global.Games to be of type 'int'?
Game. A Game object has 8 fields (exposed as properties). The key to
the HashTable is also one of these fields (GameID, of type int).
When I try to create a SortedList from the HashTable with the
following:
SortedList sortedGames = new SortedList(Glob al.Games);
I get an error message:
Argument '1': cannot convert from 'ChatMark1.Game HashTable' to 'int'
But the SortedList constructor is overloaded and one parameter it
accepts is an object of type Systems.Collect ion.IDictionary . Why does
it now expect the Global.Games to be of type 'int'?
Comment