我不能得到之所以第一個「報告」心不是工作錯誤使用未分配的局部變量的「報告」
我不是entriely一定要做到前香港專業教育學院寫類似的代碼是什麼和工作
Transfers Reports;
for (int i = 0; i < TransferList.Count; i++)
{
Reports.PlayerName = TransferList[i].PlayerName;
Reports.OldTeam = TransferList[i].OldTeam;
Reports.NewTeam = TransferList[i].NewTeam;
Reports.YearBought = TransferList[i].YearBought;
Reports.YearSold = TransferList[i].YearSold;
Reports.SellingPrice = TransferList[i].SellingPrice;
Reports.WageGiven = TransferList[i].WageGiven;
Reports.OriginalPrice = TransferList[i].OriginalPrice;
Reports.OriginalWage = TransferList[i].OriginalWage;
Reports.Height = TransferList[i].Height;
Reports.Age = TransferList[i].Age;
Reports.BirthDate = TransferList[i].BirthDate;
Reports.Nationality = TransferList[i].Nationality;
Reports.TypeofMove = TransfersList[i].TypeofMove;
if (Reports.TypeofMove == "Transfer")
{
TransfersList.Add(Reports);
}
if (Reports.TypeofMove == "Free Transfer")
{
FreeTransfersList.Add(Reports);
}
if (Reports.TypeofMove == "Loan")
{
TransfersList.Add(Reports);
}
我如何intialized列表? – user2430661
甜蜜的工作 – user2430661