using System;using System.Collections.Generic;public delegate void DExchange (ref T t1,ref T t2);public interface IExchange { void Swap(ref T t1,ref T t2);}public class MyClass : IExchange { public void Swap(ref T t1,ref T t2) { T temp = t1; t1 = t2; t2 = temp; } public void SayHello (V v1,M m1) { return; }}public class RunMyApp{ public static void Main() { string s = "abc"; string t = "efg"; MyClass my = new MyClass (); my.Swap(ref s,ref t); IExchange IE = my; IE.Swap(ref s, ref t); DExchange de = my.Swap; de(ref s, ref t); Console.WriteLine(s); Console.ReadKey(); }}