How to find Min,Max,Sum of given array?
int[] number = { 1, 2, 3, 78, 100, 1001 };
(not working)
var query = new { maximum = number.Max,
minimum = number.Min, Sum = number.Sum };
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.
You can:
Note that those are 3 separate calls, like if it were linq2sql, those would cause 3 separate roundtrips. To pull it off in a single roundtrip, you could have a query that gives a single element in the
from x in y where somecondition select…