static void MyMethod(ref MyClass f1, ref int f2) { f1.Val = f1.Val + 5; // Add 5 to field of f1 param. f2 = f2 + 5; // Add 5 to second param. }
static void Main() { string s = null; MyClass.PrintArg(s); }
static void Main() { MyClass mc = new MyClass(); // Create an instance of the class. mc.TimeUpdate(); // Invoke the method. }