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//from  w  w  w . j a v  a  2  s. c o  m
{
    static void Main(string[] args)
    {
        string[] codeNames = {"Python", "Java", "Javascript", "Bash", "C++", "Oracle"};
        
        string minName = codeNames.Min();
        Console.WriteLine(minName);
    }
}

Result

Related Topic