作者mthunter (阿凯)
看板C_Sharp
标题[问题] 有关 List 的使用
时间Wed Nov 15 20:38:06 2017
List<string> OutputList = new List<string>();
foreach (SensorMessage message in e.SensorMessages)
{
OutputList.Add(string.Format("{1} SensorID: {0} State: {4} Signal: {3}% Battery: {2}v", message.ID, message.Date, message.Voltage, message.SSP(), message.State));
foreach (Datum datum in message.Data)
OutputList.Add(string.Format("{0}: {1}", datum.Description, datum.Data));
}
该如何把 物件内的所有举证 存档成 .txt 呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.168.110.92
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/C_Sharp/M.1510749488.A.B9B.html
1F:→ mthunter: 解决了 11/15 21:37