我有一個webservice,返回陣列/鋸齒陣列的數組。從webservice處理數組
我有問題來處理它在我的本地C#窗體窗體應用程序。
最初它給我內容類型錯誤。現在使用示例波紋管代碼,它返回一個空數組。
我也試過返回一維數組,但結果是一樣的。
WebService的側面:
[WebMethod]
public string[] teste()
{
string[] a = new string[1] { "one" };
string[] b = new string[1] { "two" };
string[][] c = { a, b };
return c;
}
本地端:
class open_notes
{
public static ServiceReference1.Smart_Stick_ServiceSoapClient web_service = new ServiceReference1.Smart_Stick_ServiceSoapClient();
public static void open()
{
string[][] a = null;
a [0][0] = web_service.teste().ToString();
MessageBox.Show(a[0][0]);
}
}