
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
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 Articles
- 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
- C# program to find K’th smallest element in a 2D 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 the largest element from an array using Lambda Expressions
- Program to find out the k-th smallest difference between all element pairs in an array in C++
- Program to find maximum XOR with an element from array in Python
- C++ Program to find kth Smallest Element by the Method of Partitioning the Array\n
- C# program to get the last element from an array
- C# Program to display the first element from an array
- Python program to find k'th smallest element in a 2D array
- Python Program to find the largest element in an array

Advertisements