Step : 3 Code
using System;
using System.Data;
using System.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String[] QueryString = { "One", "Two", "Three", "Four", "Five",
"Six" };
int[] intA = { 1, 3, 2, 4, 5 };
// Define the query.
var ThisQuery =
from StringValue
in QueryString
orderby StringValue
orderby StringValue.Length
select StringValue + "\r\n";
//var intArrayAscend = from n in intA where n < 10 select n;
var intArrayAscend = from n in intA.AsEnumerable() orderby n
ascending select n;
var intArrayDescend = from n in intA.AsEnumerable() orderby n
descending select n;
// Display the String Data Type
L1.Text += "Read String : String Array Data Type <br/>     ";
foreach (String ThisValue in ThisQuery)
{
L1.Text += "  " + ThisValue;
}
// Display the result.
L1.Text += "<br/>Read Integer: Integer Array Data Type <br/>   ";
// foreach (var ThisValue in intA)
foreach (int ThisValue in intA)
{
L1.Text += "  " + ThisValue + ",";
}
L1.Text += "<br/>Read var and Sort Ascending: Integer Array Data
Type <br/>   ";
// foreach (var ThisValue in intA)
foreach (var ThisValue in intArrayAscend)
{
L1.Text += "  " + ThisValue + ",";
}
L1.Text += "<br/>Read var and Sort Descending: Integer Array Data
Type <br/>   ";
// foreach (var ThisValue in intA)
foreach (var ThisValue in intArrayDescend)
{
L1.Text += "  " + ThisValue + ",";
}
}
}