[問題] 有關 List 的使用
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://www.ptt.cc/bbs/C_Sharp/M.1510749488.A.B9B.html
→
11/15 21:37,
6年前
, 1F
11/15 21:37, 1F