namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MyClass s = new MyClass(); s.val = 10; int i = 20; Console.WriteLine("s.val={0},i={1}",s.val,i); MyMethod(s, i); Console.WriteLine("s.val={0},i={1}", s.val, i); Console.Read(); } static void MyMethod(MyClass f1,int f2) { f1.val = f1.val + 5; f2 = f2 + 5; } } class MyClass { public int val = 20; } }