I need to define a method which returns multiple arrays in .NET. i have tried using "Tuple" but it needs the method to be declared "private". in my case, i am using web service and when i declare method private, it does not appear in list of methods of webservice. can somebody suggest me what to do?
1 Answer
You can return an IEnumerable<int[]> for example. Just make sure that you use the correct type instead of int.
BTW: Using Tuple doesn't imply that you have to make your method private. There is something else going on with this.
2 Comments
just a learner
if i use this, what should be written with retun statement. i mean return statement will be like : return ......??
Daniel Hilgarth
@justalearner: I have no idea how you get your arrays. But it would probably look something like this:
return new List<int[]> { array1, array2, array3 };
ASMX Web Service?