Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/csharp/whats-new/csharp-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ if any, is lost.
## Index Initializers

*Index Initializers* is one of two features that make collection
initializers more consistent. In earlier releases of C#, you could use
*collection initializers* only with sequence style collections:
initializers more consistent with index usage. In earlier releases of C#, you could use
*collection initializers* only with sequence style collections, including <xref:System.Collections.Generic.Dictionary%602> with braces around Key-Vlue pairs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo and what about rephrasing: ...around Key-Vlue pairs -> ...around key and value pairs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkulikov My sincere apologies. I did not mean for that to happen. I was sick that day so stayed home and was looking at what opportunities were available. Will update accordingly, and thank you for your recommendation. Greatly appreciated!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevonAleshire thank you very much for updating the text.


[!code-csharp[ListInitializer](../../../samples/snippets/csharp/new-in-6/initializers.cs#ListInitializer)]

Now, you can also use them with <xref:System.Collections.Generic.Dictionary%602> collections and similar types:
Now, you can use them with <xref:System.Collections.Generic.Dictionary%602> collections and similar types more consistent regular index usage and assignment:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rephrase the sentence, it doesn't look grammatically correct now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rephrase as "and similar types. The new syntax supports assignment using an index into the collection."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated and submitted with the changes. Sorry for the previous issues and look forward to learning more and assisting in a greater capacity with the documentation in the future! Thanks for the help. Let me know if there are any remaining changes to be made.


[!code-csharp[DictionaryInitializer](../../../samples/snippets/csharp/new-in-6/initializers.cs#DictionaryInitializer)]

Expand Down