我不知道如何更新通用列表中的项目后,审查所有发布在这里的问题,我很抱歉。这里是我的问题:使用C#更新一个通用的列表项目
我有这样的结构:
List<LineInfo> Lines = new List<LineInfo>();
LineInfo LInfo;
struct LineInfo
{
public int line;
public int WO;
public string Brand;
public string Model;
public string Customer;
public int Qty;
public int Target;
public string Leader;
public string Start;
public string End;
public int Percent;
}
而且我想更新进入LInfo项目之一的领域“百分比”,我有当前位置(aCurrentLine)。
LInfo.Percent = Convert.ToInt32((RealProduced/DesireProd) * 100);
Lines[aCurrentLine]....?
请指教,谢谢。
太棒了!谢谢,关于可变结构,我需要了解它;) – Somebody