CSharp - Use Max operator on string array

Description

Use Max operator on string array

Demo

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
class Program/* ww w .jav  a  2  s .  com*/
{
    static void Main(string[] args)
    {
       string[] codeNames = {"Python", "Java", "Javascript", "Bash", "C++", "Oracle"};

       string maxName = codeNames.Max();
       Console.WriteLine(maxName);
    }
}

Result

Related Topic