Skip to content

Commit 265680a

Browse files
pkulikovRon Petrusha
authored andcommitted
Removed repetitive code snippet (#5496)
1 parent fa5861e commit 265680a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/csharp/whats-new/csharp-6.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ This feature means that associative containers can be initialized using
521521
syntax similar to what's been in place for sequence containers for several
522522
versions.
523523

524-
### Extension `Add` methods in collection initializers
524+
## Extension `Add` methods in collection initializers
525525

526526
Another feature that makes collection initialization easier is the ability
527527
to use an *extension method* for the `Add` method. This feature was
@@ -547,10 +547,7 @@ Now you can, but only if you create an extension method that maps `Add` to
547547

548548
What you are doing with this feature is to map whatever method adds
549549
items to a collection to a method named `Add` by creating an
550-
extension method:
551-
552-
[!code-csharp[Enrollment](../../../samples/snippets/csharp/new-in-6/enrollment.cs#Enrollment)]
553-
[!code-csharp[ExtensionAddSample](../../../samples/snippets/csharp/new-in-6/classList.cs#ExtensionAddSample)]
550+
extension method.
554551

555552
## Improved overload resolution
556553

0 commit comments

Comments
 (0)