Skip to main content
Chris Dugdale .net
Thoughts on C#, apps and technology
  • Home
  • Blog
    • A Change is as Good as a Rest - Programr.com
    • Mind Mapping Your Way to Organisational Bliss - Thinking Space
    • Your Life in Lists - Workflowy.com
  • Code
    • Convert Days, Hours and Minutes to Seconds
    • Convert String to Title Case
    • Count Instances of a Value in an Array
    • Minimum and Maximum Values of an Array
    • Printing a Binary Triangle
    • Smallest Number Divisible by 1-20
    • The Stopwatch Class as a Tool
  • Projects
    • Forex Calculator
  • About Me

You are here

Home

Array

Code Snippet - Minimum and Maximum Values of an Array

Submitted by Chris Dugdale on Thu, 01/05/2012 - 16:27

This method will take in an array of type double and return the minimum and maximum values. I wrote it to deal with temperature readings and to find the min/max for a week.

It will work with any number of array elements as it uses a foreach loop to iterate through the values and assign the smallest and largest values to a new array to be returned.

  • Read more about Code Snippet - Minimum and Maximum Values of an Array

Get in Touch

contactme@chrisdugdale.net
View Chris Dugdale's profile on LinkedIn

Popular Tags

C# Array Mobile programr.com Apps SQL Java Mind maps Applications .Net Code Snippets Javascript C++ Web Android Algorithm Diagnostics Programming Projects Winforms Project Euler Ajax for loop Foreach Loops Productivity

Recent blog posts

  • Your Life in Lists - Workflowy
  • A Change is as Good as a Rest
  • Mind Mapping Your Way to Organisational Bliss
More

Recent comments

No comments available.
Log in
  • Request new password

Powered by Drupal, design by Chris Dugdale