Skip to content

Is shadowing-in-nested-functions C# too free that people can reference outside var and define an new var with the same name in same method without any warn #5327

Answered by 333fred
yyjdelete asked this question in General
Discussion options

You must be logged in to vote

This was discussed in LDM on 11/03/2021. TLDR: we somewhat regret that you can both shadow and capture in the same local function, but we think it's not worth a warning wave or language change to correct at this point.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jnm2
Comment options

jnm2 Oct 22, 2021
Collaborator

Comment options

You must be logged in to vote
0 replies
Answer selected by 333fred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants