mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 12:58:39 +00:00
25 lines
No EOL
663 B
C#
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"));
|
|
}
|
|
}
|
|
} |