作者windqqr (つき)
看板C_Sharp
標題Re: [問題] 在 PDA下的路徑(已爬文)
時間Wed Dec 17 00:28:44 2008
改成以下的方式試試
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