Re: [問題] 在 PDA下的路徑(已爬文)
改成以下的方式試試
String ApPath = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName()
.CodeBase);
String path= ApPath + @"\test.csv"
StreamReader sr = new StreamReader(path);
: 為何當我改寫成PDA版的時候。
: 就不能跑了呢?
: 他總是說找不到檔案。
: 我有把執行檔和test.csv放在一起喔!
---
另外最好再檢查一下檔名與code裡寫的是否相同 ^^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 124.11.194.118
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):