Home > Articles > Details

A local or parameter named cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter

Solved!! A local or parameter named cannot be declared in this scope Click to Watch Video

Problem: When declaring a variable inside a using directive in C# (C-Sharp) you might get an error that says, "A local or parameter named 'Dm' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter".

 


Please Login to see the rest of the answer
Answer: Look around in the function and make sure that the Variable is not declared twice.


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy