我不明白为什么第一个“报告”不起作用
我不确定该怎么做我之前写过类似的代码并且有效
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);
}