我希望能够从文本文件中读取数字,并将它们存储在字符串数组中,以便在listBox中显示它们。
下面是代码:
string[] filePath = @"C:Site\Project3\Sales.txt"; foreach (string val in filePath) { listBoxValues.Items.Add(val.ToString()); }
https://stackoverflow.com/questions/51576019
相似问题