roguecoder
October 11th, 2009, 09:45 AM
had this problem for a while can't seem to get past it. i would love a fresh set of eyes.
its probably really easy but here we go anyway.
<code>
const int PLAYER = 0;
const int DEALER = 1;
private Pack pack = new Pack();
private ArrayList [] hands = new ArrayList[2];</code>
i am trying to place a variable like so
<code> this.hands[PLAYER].Add("hello"); </code>
but i get the following error
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
any help would be greatly appreciated.
its probably really easy but here we go anyway.
<code>
const int PLAYER = 0;
const int DEALER = 1;
private Pack pack = new Pack();
private ArrayList [] hands = new ArrayList[2];</code>
i am trying to place a variable like so
<code> this.hands[PLAYER].Add("hello"); </code>
but i get the following error
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
any help would be greatly appreciated.