作者chrishappy11 ()
看板C_Sharp
标题[问题] 请问用C#取得filelistbox问题
时间Fri May 24 14:20:23 2013
请问一下
小弟现在用filelistbox来取得档案路径
但是C#的路径要("C:\\....\\") 或(@"C:\...")
可是filelistbox->dirListBox1.Path + fileListBox1.FileName
是变成("C:\....\....")
会找不到档案
请问我该怎麽办呢~???
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 119.14.168.8
1F:→ rainbow001:也许你已经给出答案了? 05/24 19:20
2F:→ rainbow001:@"C:\..." 05/24 19:20
3F:→ s3748679:= =" runtime(执行期) 应该不用理会跳脱字元的问题吧... 05/24 20:25
4F:→ s3748679:猜是字串末多个斜线或少个斜线所导致合并的问题.. 05/24 20:28
5F:→ s3748679:如果是的话可以试试 System.IO.Path.Combine来解决 05/24 20:28