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;