What is the difference between:
int[] myIntArray
and
list<int> myIntArray
?
In web services I read that I should pick one or the other and not mix the two, why?
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.
On the wire they will be indistinguishable – i.e. both
Customer[]andList<Customer>are going to look (roughly) like:So there is no point having logic that treats the two differently. Ultimately,
int[]is a pain to work with (Addetc), so I would tend to useList<T>– of course,wsdl.exenicely defaults to arrays, IIRC – but there is a command line switch (or perhaps there is for wse/wcf).