Cosmos/source/FrodeTest/Test/LinqTest.cs
2008-11-15 22:08:44 +00:00

25 lines
No EOL
663 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FrodeTest.Test
{
public static class LinqTest
{
public static void RunTest()
{
Console.WriteLine(" -- Testing LINQ --");
string[] text = new string[] { "hello", "world", "LinqWorks", "!", };
var result = (from word in text
where word == "LinqWorks"
select word);
//Console.WriteLine(result.Last());
Check.Text = "Linq";
Check.Validate(result.Last().Equals("LinqWorks"));
}
}
}