In a C# desktop 2010 application, I am getting the error message, "does not exist in current context".
The error message is referring to the following line of code:
proxy.addErrorReport(errRpts, attList);
Can you tell me what to look at to determine what is causing the error?
C# "does not exist in current context".
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sunny SharmaRank #223 · 11.1K reputationPosted Jun 24, 2013, 8:42 PM EDT
The error pertains to the Scoping of a variable or object member. I suggest you to put breakpoints in your code and check where actually the problem is being originated.
Further, you better show us your code to help yourself.
Hope it helps :)
Cheers!
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 24, 2013, 10:29 PM EDT
hi,
This type of error due to wrong variable / control scope or due to protection level.
i think you can check proxy varible it is accessble in current object?
hope this will help you.
VulpesRank #55 · 29.2K reputationPosted Jun 25, 2013, 1:01 AM EDT
If they're declared in any of these places, then they're in scope and so can be used:
1. Within the same method.
2. They're parameters of the current method.
3. They're fields (i.e. class level variables) of the class which contains the current method.
Otherwise, they're not in scope and (depending on the circumstances) you'll need to change where they're declared to bring them within the scope of the method call which is giving the error.