Name does not exist in the current context

前端 未结 11 1690
时光说笑
时光说笑 2020-12-05 12:34

So, I\'m working on this project between my laptop and my desktop.

The project works on the laptop, but now having copied the updated source code onto the desktop, I

11条回答
  •  不知归路
    2020-12-05 13:31

    From the MSDN website:

    This error frequently occurs if you declare a variable in a loop or a try or if block and then attempt to access it from an enclosing code block or a separate code block.

    So declare the variable outside the block.

提交回复
热议问题