A very simple class A with an instance method MethodA. | Lecture 5 - slide 34 : 45 Program 2 |
using System; public class A{ private int state; public A(int i){ state = i; } public void MethodA(string s){ Console.WriteLine("A: {0}, {1}", state, s); } } | An instance variable. Constructor. An instance method in class A. |