[問題] 有關 List 的使用

看板C_Sharp作者 (阿凱)時間6年前 (2017/11/15 20:38), 編輯推噓0(001)
留言1則, 1人參與, 6年前最新討論串1/1
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
文章代碼(AID): #1Q33KmkR (C_Sharp)