首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c#访问路径有关问题,The path is not of a legal form

2012-03-09 
c#访问路径问题,The path is not of a legal form.把总配置文件得到目录,然后放到ArrayList里面,然后再读

c#访问路径问题,The path is not of a legal form.
把总配置文件得到目录   ,然后放到ArrayList里面,然后再读出来,

                public   static   void   Run(ArrayList     ss)
                {
                        foreach   (string   s   in   ss)
                        {                            
                                        FileSystemWatcher   watcher   =   new   FileSystemWatcher();
                                        watcher.Path   =   s;//@ "d:\DownLoads ";//args[1];
                                        /*   Watch   for   changes   in   LastAccess   and   LastWrite   times,   and  
                                              the   renaming   of   files   or   directories.   */
                                        //watcher.NotifyFilter   =   NotifyFilters.LastAccess   |   NotifyFilters.LastWrite
                                        //       |   NotifyFilters.FileName   |   NotifyFilters.DirectoryName;
                                        ////   Only   watch   text   files.
                                        watcher.Filter   =   "*.flv ";

                                        //   Add   event   handlers.
                                        //watcher.Changed   +=   new   FileSystemEventHandler(OnChanged);
                                        watcher.Created   +=   new   FileSystemEventHandler(OnCreated);
                                        //watcher.Deleted   +=   new   FileSystemEventHandler(OnChanged);
                                        //watcher.Renamed   +=   new   RenamedEventHandler(OnChanged);

                                        //   Begin   watching.


                                        watcher.EnableRaisingEvents   =   true;
                       
                        }            
                }


Code2


        string   fn   =   myQ.Dequeue();
                                                string   temp   =   new   FileInfo(fn).FullName;
                                                Process   P   =   Process.Start( "flvmdi.exe, "   +   temp);
                                                WriteLog(fn,   name);

c:\\Downloads\\

出现两个斜杠,应该怎么办

[解决办法]
检查temp的值

热点排行