Hi,
I am creating a dictionary and then populating it with entries in main(), then calling a method which uses said dictionary. Short of including the dictionary in the arguments being passed to this method, how can I access it without getting the error 'An object reference is required for the non-static field, method or property 'XXX.YYY.dict'?
Edit: Here is code requested:
public static void Main()
{
ulong board = AS | KH | FD | FC | TH | SH | NC;
Dictionary<ulong, int> dict; dict = new Dictionary<ulong, int>();
for (int a = 0; a < 49344; a++)
{
dict.Add(helloworld.Table.handhashes[a], helloworld.Table.ratings[a]);
}
int hand = 0;
for (int ai1 = 0; ai1 < 100000000; ai1++)
{
hand = FCheck(board);
}
}
Error happening in FCheck, following line:
FCheck = dict(condensedBoard);