Return to Snippet

Revision: 30440
at August 14, 2010 00:00 by jiewmeng


Initial Code
delegate string DelegateTest(string str);

DelegateTest delTest = new DelegateTest(Class1.Hello);
Console.WriteLine(delTest("LOL"));

class Class1{
    ...
    public static string Hello(string msg) {
         return "Hello " + msg;
    }
}

Initial URL

                                

Initial Description

                                

Initial Title
C# Basics: Delegates

Initial Tags
c

Initial Language
C#