There are 2 types of LINQ Syntax:
- 1.Fluent syntax
- 2.Query syntax
string[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" };
IEnumerable<string> query =
names.Where (name => name.EndsWith ("y"));
query.Dump ("In fluent syntax");
query =
from n in names
where n.EndsWith ("y")
select n;
query.Dump ("In query syntax");
No comments:
Post a Comment