Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in "Declare and set array element values" example #38712

Closed
Yevhenii-B opened this issue Dec 11, 2023 · 0 comments · Fixed by #40864
Closed

Typo in "Declare and set array element values" example #38712

Yevhenii-B opened this issue Dec 11, 2023 · 0 comments · Fixed by #40864
Assignees
Labels
doc-bug Problem with the content; needs to be fixed [org][type][category] dotnet-csharp/svc good first issue Issue should be good for first-time contributors, with clear instructions help wanted Good for community contributors to help [up-for-grabs] in-pr This issue will be closed (fixed) by an active pull request. lang-reference/subsvc okr-health Content-health KR: Concerns article defects/freshness or build warnings. Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@Yevhenii-B
Copy link

Yevhenii-B commented Dec 11, 2023

Type of issue

Code doesn't work

Description

In the first code block example for "Declare and set array element values" there are square brackets instead of curly:
// Now
// Declare and set array element values.
int[] array2 = [1, 2, 3, 4, 5, 6];

// Should be
// Declare and set array element values.
int[] array2 = {1, 2, 3, 4, 5, 6};
[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/arrays

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/builtin-types/arrays.md

Document Version Independent Id

38aea826-1f7b-049e-1b9e-d13eea138c44

Article author

@BillWagner

Metadata

  • ID: be43453e-7757-f4db-6736-ba8be7ebc4d6
  • Product: dotnet-csharp
  • Technology: csharp-language-reference

Associated WorkItem - 255031

@issues-automation issues-automation bot added lang-reference/subsvc dotnet-csharp/svc Pri1 High priority, do before Pri2 and Pri3 labels Dec 11, 2023
@ghost ghost added doc-bug Problem with the content; needs to be fixed [org][type][category] help wanted Good for community contributors to help [up-for-grabs] labels Dec 11, 2023
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Dec 11, 2023
@ghost ghost added good first issue Issue should be good for first-time contributors, with clear instructions okr-health Content-health KR: Concerns article defects/freshness or build warnings. labels Dec 11, 2023
@ghost ghost added in-pr This issue will be closed (fixed) by an active pull request. and removed in-pr This issue will be closed (fixed) by an active pull request. labels Dec 12, 2023
BillWagner added a commit to BillWagner/docs that referenced this issue May 13, 2024
Fixes dotnet#38712

Note that these examples all use collection expressions.
@dotnet-policy-service dotnet-policy-service bot added in-pr This issue will be closed (fixed) by an active pull request. labels May 13, 2024
@BillWagner BillWagner self-assigned this May 13, 2024
@BillWagner BillWagner added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label May 13, 2024
BillWagner added a commit that referenced this issue May 13, 2024
* Add note about collection expressions.

Fixes #38712

Note that these examples all use collection expressions.

* Update docs/csharp/language-reference/builtin-types/arrays.md

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>

* show both examples in note.

---------

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-bug Problem with the content; needs to be fixed [org][type][category] dotnet-csharp/svc good first issue Issue should be good for first-time contributors, with clear instructions help wanted Good for community contributors to help [up-for-grabs] in-pr This issue will be closed (fixed) by an active pull request. lang-reference/subsvc okr-health Content-health KR: Concerns article defects/freshness or build warnings. Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: ✅ Done
3 participants