class Sample { public int MyFun(int i) { Console.WriteLine("Welcome to CuriousTab.com !" ); return 0; } }
delegate void del(int i);
Sample s = new Sample();
deld = new del(ref s.MyFun);
d(10);
delegate int del(int i);
Sample s = new Sample(.);
del = new delegate(ref MyFun);
del(10);
Sample s = new Sample();
delegate void del = new delegate(ref MyFun);
del(10);
delegate int del(int i);
del d;
Sample s = new Sample();
d = new del(ref s.MyFun);
d(10);
delegate int del(int i);
del d;
Sample s = new Sample();
d = new del(ref s.MyFun);
d(10);
public class TestCuriousTab { public void TestSub<M> (M arg) { Console.Write(arg); } } class MyProgram { static void Main(string[] args) { TestCuriousTab tab = new TestCuriousTab(); tab.TestSub("CuriousTab "); tab.TestSub(4.2f); } }
public class Generic<T> { public T Field; public void TestSub() { T i = Field + 1; } } class MyProgram { static void Main(string[] args) { Generic<int> gen = new Generic<int>(); gen.TestSub(); } }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.