Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 497337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:46:18+00:00 2026-05-13T05:46:18+00:00

How to find Min,Max,Sum of given array? int[] number = { 1, 2, 3,

  • 0

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 }; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:46:19+00:00Added an answer on May 13, 2026 at 5:46 am

    You can:

    var values = new { 
                   maximum = number.Max(), 
                   minimum = number.Min(), 
                   Sum = number.Sum() 
                };
    

    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 …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given an array of size N I need to find the min number of
Is there a way to find out the number of digits of min/max values
Possible Duplicate: min and max in multidimensional-array How do i find max and min
Given this array int [] myArray = {5,-11,2,3,14,5,-14,2}; You are to find the maximum
I'm looking for an algorithm to find bounding box (max/min points) of a closed
Is there any easy way to find min/max value in the set of input
hi i am trying to find min and max values of x and y
I want to find the fastest way to get the min and max of
I have a procedure to find the first, last, max and min prices for
So I have this function used to calculate statistics (min/max/std/mean). Now the thing is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.