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

ftp下载进度条有关问题

2012-01-23 
ftp下载进度条问题!longDownFileSizeFtpWebRequestMyRequestDown(FtpWebRequest)WebRequest.Create( ft

ftp下载进度条问题!
long   DownFileSize;
  FtpWebRequest   MyRequestDown   =   (FtpWebRequest)WebRequest.Create( "ftp://... ");
MyRequestDown.Credentials   =   new   NetworkCredential(user,   pass);
MyRequestDown.Method   =   WebRequestMethods.Ftp.GetFileSize;
FtpWebResponse   SerFileSize   =   (FtpWebResponse)MyRequestDown.GetResponse();
DownFileSize   =   SerFileSize.ContentLength;
.
.
.
FileInfo   FileSize   =   new   FileInfo(Application.StartupPath   ...);
this.ProgressBar.Value   =   Convert.ToInt32(Math.Round(FileSize.Length/DownFileSize))*100;
报编译错误:错误1在以下方法或属性之间的调用不明确:“System.Math.Round(double)”和“System.Math.Round(decimal)”
怎么办?

[解决办法]
this.ProgressBar.Value = Convert.ToInt32(FileSize.Length/DownFileSize)*100;

热点排行