posts - 124,  comments - 29,  trackbacks - 0

              
          for (int i = 0; i < niList.Count; i++)
            {  
                NeFtpInfo neIn = niList[i];
                DownLoadOneServer dlone = new DownLoadOneServer(neIn);
                Thread throne = new Thread(dlone.toDownLoadOne); //注意这块是函数名,不加"()",而不是函数调用
                throne.Start();
            }

            Class Object = new Class();
            Thread th = new Thread(Object.Method);
             th.start();


using System;
using System.Collections.Generic;
using System.Text;

namespace FTPDownLoad
{
    class DownLoadOneServer
    {
        NeFtpInfo nfi = new NeFtpInfo();
        public DownLoadOneServer(NeFtpInfo nfi)
        {
            this.nfi = nfi;
        }
        public void toDownLoadOne()
        {
            FtpHelper ftphelper = new FtpHelper(nfi.ServerIP, nfi.UserName, nfi.Password);
            ftphelper.DownLoadDirectory(nfi.ServerPath, nfi.LocalPath);
        }
    }
}

posted on 2008-09-26 17:45 天书 阅读(855) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理



<2008年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(5)

随笔档案

文章分类

文章档案

好友的Bolg

搜索

  •  

最新评论

阅读排行榜

评论排行榜