作者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