Skip to content

Commit d6ffc18

Browse files
committed
docs: removes additional cases to avoid the page being too long
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
1 parent dd005e5 commit d6ffc18

2 files changed

Lines changed: 1 addition & 21 deletions

File tree

csharp/ql/src/Linq/MissedWhereOpportunity.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on the even ones.</p>
3131
<p>This is far better expressed using the <code>Where</code> method.</p>
3232
<sample src="MissedWhereOpportunityFix.cs" />
3333

34-
<p>The following examples should not use <code>Where</code>, because the matching branch exits the
34+
<p>The following example should not use <code>Where</code>, because the matching branch exits the
3535
method or iterator instead of continuing with filtered loop work.</p>
3636
<sample src="MissedWhereOpportunityGood.cs" />
3737

csharp/ql/src/Linq/MissedWhereOpportunityGood.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,4 @@ class MissedWhereOpportunityGood
1010

1111
return null;
1212
}
13-
14-
public System.Collections.Generic.IEnumerable<int> ValuesUntilFirstEven(System.Collections.Generic.IEnumerable<int> values)
15-
{
16-
foreach (int value in values)
17-
{
18-
if (value % 2 == 0)
19-
yield break;
20-
21-
yield return value;
22-
}
23-
}
24-
25-
public void ThrowOnFirstEven(System.Collections.Generic.IEnumerable<int> values)
26-
{
27-
foreach (int value in values)
28-
{
29-
if (value % 2 == 0)
30-
throw new System.InvalidOperationException("Unexpected even value.");
31-
}
32-
}
3313
}

0 commit comments

Comments
 (0)