Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    A very simple class A with an instance method MethodA.Lecture 6 - slide 8 : 20
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);    
  }                                                
}
 
 
A simple class A in which we intende
to use MethodA as Message delegate.
An instance variable.
 
Constructor.
 
 
 
An instance method in class A.
It is important for the example
that MethodA is an instance method.