Hi Guys
I'm having trouble getting a value from a hash table based on a key that I have added
The key is the handle to a socket and the value is an instance of a class called SckClientHandler
Class SckClientHandler has a ClientSocket property which is a valid Socket object
Here I add to the hash table
_clientSocketHash.Add((int)objSckClientHandler.Cli entSocket.Handle, objSckClientHandler
where objSckClientHandler is an instance of SckClientHandler
the handle in my test run is 1036
when try to inspect the hash table by the key
_clientSocketHash["1036"
I get an error stating: function '_clientSocketHash.get_Item' evaluated and returned nul
The debugger shows
- _clientSocketHash {Count=1} System.Collections.Hashtabl
+ [(short)1036] {WTP.Server.SckClientHandler} System.Objec
I know the object was added to the hash table, but I don't know how to get a reference to i
I also trie
object hashTableObject = _clientSocketHash["1036"];
SckClientHandler clientSocket =(SckClientHandler)hashTableObject
but, I get a null object
What is going on here
Thanks a lo