Skip to content

Conversation

@TimMcGilly
Copy link
Contributor

Summary

Adds description of setting length in C# array initialisation on https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/.

This makes it closer to the VB.Net documentation array example (https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/arrays/) and C# single array initialisation. (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/single-dimensional-arrays)

This is important as the number passed to array initialisation in C# is the length whereas in VB.Net is the maximum index so length + 1.

@TimMcGilly TimMcGilly requested a review from BillWagner as a code owner April 22, 2020 13:47
@dotnet-bot dotnet-bot added this to the April 2020 milestone Apr 22, 2020
@TimMcGilly TimMcGilly changed the title C# array guide to initialisation length C# array guide initialisation length Apr 22, 2020
@BillWagner BillWagner added the ✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository label Apr 22, 2020
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Thanks for making this update @TimMcGilly We appreciate it.

I've reviewed the change, and I'll :shipit: now.

Thanks for making your first contribution to docs! 🎆

@BillWagner BillWagner merged commit ca72002 into dotnet:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants