Your second sample
private void MyMethod(int MyVariable)
{
MyVariable = 23;
}
makes no sense,
MyVariable
is an input parameter to the method not a variable member of the class. Your question is not very clear as to what you are trying to achieve. Most people nowadays use properties in C# to get and set variables, but there is no reason why you should not access them within a method of the class.