Skip to content

Commit 151efbb

Browse files
SimpleSamplesBillWagner
authored andcommitted
Update var_1.cs (#4849)
Clarifying the comment to place less emphasis on all queries requiring "var" and making it clear that the anonymous type makes var required.
1 parent b58166f commit 151efbb

File tree

1 file changed

+2
-2
lines changed
  • docs/csharp/language-reference/keywords/codesnippet/CSharp

1 file changed

+2
-2
lines changed

docs/csharp/language-reference/keywords/codesnippet/CSharp/var_1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Console.WriteLine(s);
1313
}
1414

15-
// Example #2: var is required because
15+
// Example #2: var is required when
1616
// the select clause specifies an anonymous type
1717
var custQuery = from cust in customers
1818
where cust.City == "Phoenix"
@@ -23,4 +23,4 @@
2323
foreach (var item in custQuery)
2424
{
2525
Console.WriteLine("Name={0}, Phone={1}", item.Name, item.Phone);
26-
}
26+
}

0 commit comments

Comments
 (0)