看板 C_Sharp 關於我們 聯絡資訊
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
mthunter: 解決了 11/15 21:37