0

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?

2
  • 3
    why does it need to be private if you want to expose it in a web service. you can't have both. Commented Feb 5, 2013 at 13:29
  • Is this an ASMX Web Service? Commented Feb 5, 2013 at 14:10

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

if i use this, what should be written with retun statement. i mean return statement will be like : return ......??
@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 };

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.