CSharp examples for LINQ:Select
Select from an array
using System;// w w w. j a va 2 s .c om using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using System.Data; class MainClass { static void Main(string[] args) { string[] array = new string[] { "Oracle", "MySQL", "C", "fig", "XML", "file", "PLSQL" }; IEnumerable<string> arrayEnum = from e in array select e; foreach (string str in arrayEnum) { Console.WriteLine("Element {0}", str); } } }