我不明白返回類型...我是一名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