Is it preferable to return a Dictionary<int, int> or an int[][] on a WCF response? Or does it not matter?
Is it preferable to return a Dictionary<int, int> or an int[][] on a WCF
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They really are two very different things, and serve different purposes.
You’d probably want to return
Dictionary<int,int>if you’re trying to return a mapping from single integers to other single integer values.If, however, you are returning multiple “lists” of integer values, then a jagged array would be appropriate. In this case, you’d be return an array of arrays of integers: basically, multiple numerical value collections.