我不明白返回类型...我是一名VB开发人员。它是否返回一些数组?返回类型描述
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static object GetUploadStatus()
{
//Get the length of the file on disk and divide that by the length of the stream
UploadDetail info = (UploadDetail)HttpContext.Current.Session["UploadDetail"];
if (info != null && info.IsReady)
{
int soFar = info.UploadedLength;
int total = info.ContentLength;
int percentComplete = (int)Math.Ceiling((double)soFar/(double)total * 100);
string message = "Uploading...";
string fileName = string.Format("{0}", info.FileName);
string downloadBytes = string.Format("{0} of {1} Bytes", soFar, total);
return new {
percentComplete = percentComplete,
message = message,
fileName = fileName,
downloadBytes = downloadBytes};
}
//Not ready yet
return null;
}
谢谢
http://msdn.microsoft.com/en-us/library/bb397696.aspx - 匿名类型 – 2011-05-16 13:05:12
尝试的http://转换器.telerik.com /获得初步翻译(在这种情况下翻译看起来不错) – 2011-05-16 13:10:50
感谢@Bala它的一个好工具.. – 2011-05-17 04:34:58