CSharp - Use Min operator on string value array

Description

Use Min operator on string value array

Demo

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
class Program/*  ww  w.ja  v a  2  s.co  m*/
{
    static void Main(string[] args)
    {
        string[] codeNames = {"Python", "Java", "Javascript", "Bash", "C++", "Oracle"};
        
        string minName = codeNames.Min();
        Console.WriteLine(minName);
    }
}

Result

Related Topic