List问题
在list中使用结构体的时候,怎么修改结构中的数据。
public List<structCars> lstCars = new List<structCars>();
//struct:
public struct structCars
{
public bool bValid;
}
我现在想修改lstCars列表中的结构体数据?
我使用lstCars[i].bValid时出现:无法修改“System.Collections.Generic.List<structCars>.this[int]”的返回值,因为MainForm.cs它不是变量