

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to find the smallest element from an array
Declare an array −
int[] arr = { 5, 9, 2, 7 };
Now to get the smallest element from an array, use the Min() method −
arr.Min());
Here is the complete code −
Example
using System; using System.Linq; class Demo { static void Main() { int[] arr = { 5, 9, 2, 7 }; Console.WriteLine(arr.Min()); } }
Output
2
- Related Questions & Answers
- C# Program to find the smallest element from an array using Lambda Expressions
- C# Program to find the largest element from an array
- Find the Smallest element from a string array in JavaScript
- Java program to find the smallest number in an array
- Java program to find the 2nd smallest number in an array
- Java program to find Largest, Smallest, Second Largest, Second Smallest in an array
- C++ Program to find kth Smallest Element by the Method of Partitioning the Array
- C# Program to find the largest element from an array using Lambda Expressions
- C++ program to find the smallest element among three elements
- C# program to get the last element from an array
- C# Program to display the first element from an array
- Program to find out the k-th smallest difference between all element pairs in an array in C++
- Python Program to find the largest element in an array
- PHP program to find the minimum element in an array
- PHP program to find the maximum element in an array
Advertisements