Invalid cast exception while calling OpCustom

Options
durandil
edited December 2010 in DotNet
Hi

The following code raises a System.InvalidCastException in PhotonDoNet.dll:
_peer.OpCustom(0, new Hashtable() { { 0, 1} }, true, 0);

This does not happen if the hash table is empty:
_peer.OpCustom(0, new Hashtable(), true, 0);

Any clues?

Stephane

Comments

  • Okay, found the answer somewhere on this forum, the key of the hash table has to be a byte.