I am getting a
'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
when i run my code, everthing seems to be fine, i have been unable to find the bug. Here is path of my class caling my get/set
foreach (Tran transaction in transactions)
{
Account sAcc = items[transaction.ID1];//getting error here
Account dAcc = items[transaction.ID2];
decimal tempResult = sAcc.Money - transaction.Amount;
foreach (char s in sAcc.BorP)
Console.WriteLine(s);
And here is my get/set class
public class Tran
{
public int ID1 { get; set; }
public int ID2 { get; set; }
public decimal Amount { get; set; }
}
It was running before and i ran some more test and i keep getting this error and dont know what could be causing int. Thanks for you help