Use Min operator on string value array
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); } }