求教!在ListBox中载入指定目录下的表文件(在Pocket PC上)
在WindowsApplication下 ,用下列代码:
ListMapName.Items.Clear();
StreamReader sr = new StreamReader("E:\test\k\map.res");
string str;
while((str=sr.ReadLine())!=null)
{
ListMapName.Items.Add(str);
}
能实现功能,但在SmartDeviceApplication上却不能!
显示的错误为An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll
Additional information: DirectoryNotFoundException。
有什么别的解决办法吗?