Skip to content
This repository was archived by the owner on Sep 11, 2019. It is now read-only.

Commit 6fd5feb

Browse files
committed
Replace lambda with anonymous function in C#2.0 example
1 parent 8a5f7b0 commit 6fd5feb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

slides/10 LINQ pt1/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ foreach (var i in source)
8181
}
8282
}
8383

84-
results.Sort((x1, x2) => x2 - x1);
84+
results.Sort(delegate (int x1, int x2) { return x2 - x1; });
8585
```
8686

8787
</div>
@@ -390,15 +390,15 @@ LINQ query can produce one of two results:
390390
enumeration
391391

392392
```cs
393-
IEnumerable<int> res = from s in sequance
393+
IEnumerable<int> res = from s in sequence
394394
where s > 3
395395
select s;
396396
```
397397

398398
scalar (statistic)
399399

400400
```cs
401-
int res = (from s in sequance
401+
int res = (from s in sequence
402402
where s > 3
403403
select s).Count();
404404
```

0 commit comments

Comments
 (0)