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

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

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".

 

Solution: Look around in the function and make sure that the Variable is not declared twice.

Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback



© 2020 - ErnesTech - Privacy