string[] StringProducts= new string[6]; StringProducts[0] = "MS Office"; StringProducts[1] = "MS Sharepoint"; StringProducts[2] = "MS Visual Studio"; StringProducts[3] = "MS Windows"; StringProducts[4] = "Macintosh"; StringProducts[5] = "Oracle"; //Select all String Starting with 'a' using LINQ IEnumerableresult = from str in StringProducts where str[1] == 'S' select str; foreach (string str in result) { Console.WriteLine(str); } Console.ReadLine();
Copyright © 2012 - All Rights Reserved - VKInfotek.com