Advertisement
Guest User

Untitled

a guest
Jun 14th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System.IO;
  2. using System;
  3.  
  4. class Program
  5. {
  6.     static void Main()
  7.     {
  8.         var test = new Test();
  9.        
  10.         var proxy = (ITest)test;
  11.        
  12.         proxy.Display("Method called");
  13.        
  14.        
  15.         Console.ReadLine();
  16.     }
  17. }
  18.  
  19. public interface ITest {
  20.     void Display(String msg);
  21. }
  22.  
  23. public class Test : ITest
  24. {
  25.     public void Display(String msg)
  26.     {
  27.         Console.WriteLine(msg);  
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement