Oh boy - this is going to be difficult to explain without pictures, so you would be better off looking in a book. But:
In your click handler, you create an instance of Class1, and assign it to a variable called oClass1. What is actually in oClass1? Is it an int - the total data stored by Class1? Or is it something else?
What is actually stored in oClass1 is not the actual Class1 instance - it is a reference to the class instance. I.e. the instance you created is on the heap and oClass1 is (probably) on the stack. Why? So that you could have a second variable if you needed it:
protected void Button2_Click(object sender, EventArgs e)
{
Class1 oClass1 = new Class1();
Class1 oClass2 = oClass1;
oClass1.MyProperty1 = 10;
MethodCall(oClass1);
TextBox2.Text = oClass1.MyProperty1.ToString();
}
And then both oClass1 and oClass2 would refer to the same instance of a Class1.
With me so far? Good.
You then hand the content of oClass1 to your method. What gets handed through? Answer: the reference to the instance. Not oClass1, but the content of oClass1.
So when you modify MyProperty in MethodCall you are modifying the object that oClass1 refers to.
This is a lot easier to explain with pictures!
Try this and you might see what I mean:
class Class1 { public int i;}
private void ShowTheDifference()
{
Class1 cs = new Class1();
cs.i = 100;
Method(cs);
MessageBox.Show(cs.i.ToString());
Method2(cs);
MessageBox.Show(cs.i.ToString());
}
void Method(Class1 cs) { cs = new Class1(); cs.i = 999; }
void Method2(Class1 cs) { cs.i = 999; }