
Untitled
By: a guest on
Aug 9th, 2012 | syntax:
None | size: 0.55 KB | hits: 6 | expires: Never
Is it possible to use a LINQ Query in Windows Workflow rule condition?
private static void ShowQueryWithCode(IEnumerable<string> names)
{
Console.WriteLine("LINQ Query in Code - show names that start with 'R'");
// Assuming there are no null entries in the names collection
var query = from name in names where name.StartsWith("R") select name;
// This is the same thing as
// var query = names.Where(name => name.StartsWith("R"));
foreach (var name in query)
{
Console.WriteLine(name);
}
Console.WriteLine();
}