mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 21:08:51 +00:00
23 lines
No EOL
563 B
C#
23 lines
No EOL
563 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());
|
|
}
|
|
}
|
|
} |