You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the left side of a deconstruction must be either all variable declarations, or assignments to existing variables (or a discard). This would allow a mix of declarations and variables on the left side.
Update deconstruction language reference article.
Check tuple article for potential examples.
Check for other deconstruction examples that could be updated.
The text was updated successfully, but these errors were encountered:
BillWagner
added
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Pri1
High priority, do before Pri2 and Pri3
and removed
Pri3
labels
May 10, 2021
BillWagner
changed the title
[Mix declaration and assignment in deconstruction](https://github.com/dotnet/csharplang/issues/125)
Allow both assignment and new variable declarations in the same deconstruction
May 11, 2021
Fixesdotnet#24116
Beginning with C# 10, the left side of a deconstruction can mix variable assignment and variable initialization.
With this PR, I searched for all instances of "deconstruct" to see if they referenced the previous restriction. Only one instance made that declaration.
Update the "deconstruct" article to add a new samples that shows the new syntax.
* deconstruction allows assignment and initialization
Fixes#24116
Beginning with C# 10, the left side of a deconstruction can mix variable assignment and variable initialization.
With this PR, I searched for all instances of "deconstruct" to see if they referenced the previous restriction. Only one instance made that declaration.
Update the "deconstruct" article to add a new samples that shows the new syntax.
* fix build warnings.
* deconstruction allows assignment and initialization
Fixesdotnet#24116
Beginning with C# 10, the left side of a deconstruction can mix variable assignment and variable initialization.
With this PR, I searched for all instances of "deconstruct" to see if they referenced the previous restriction. Only one instance made that declaration.
Update the "deconstruct" article to add a new samples that shows the new syntax.
* fix build warnings.
Mix declaration and assignment in deconstruction
Currently the left side of a deconstruction must be either all variable declarations, or assignments to existing variables (or a discard). This would allow a mix of declarations and variables on the left side.
The text was updated successfully, but these errors were encountered: