我不知道如何更新通用列表中的項目後,審查所有發佈在這裏的問題,我很抱歉。這裏是我的問題:使用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