At the code above, we can't access the 'myVariable' variable from Method2, because it isn't in the current context (scope), in order to access this variable inside two methods we have to declare it at the same level as our methods (for example declaring above Method1), you can read more about scopes here.
int myVariable = 0;
// here we will get an error:
//The name 'myVariable' does not exist in the current context
myVariable = 1;
A small summary:
I'm sorry about my short time, for next post I'll try to cover 'Inheritance and Implementation' inside classes to make it more OOP, Feel free for comment and share content or ask questions.