c# - webservice returning jagged array of ints -


i have created webservice , deployed @ http://reddyincv-001-site1.myasp.net/webservice1.asmx returns jagged array of ints.

i trying consume using silverlight, how store retrieved values webservice , store in silverlight jagged array?

this code

private sampleservice.webservice1soapclient dataservice = new sampleservice.webservice1soapclient();     public mainpage()     {         initializecomponent();         dataservice.leftclickcompleted += new eventhandler<sampleservice.leftclickcompletedeventargs>(leftclick_completed);         dataservice.leftclickasync();      }     private void leftclick_completed(object sender, sampleservice.leftclickcompletedeventargs e)     {           int[][] aaa = new int[14][];         aaa = e.result;      } 

try this

aaa= e.result.select(a => a.toarray()).toarray(); 

or

aaa= e.result.yourresulttype.select(a => a.toarray()).toarray(); 

edit:

that means returning string web service,change the return type of web service of type jagged array.

for example : web service should like

public int[][] getresult() {    int[][] result = new int[14][];    //add recodrs result     return result; } 

now in application can use this

int[][] aaa=new aaa[14][]; aaa=e.result; 

i hope helps you


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -