Created
June 4, 2012 13:16
-
-
Save Dynyx/2868305 to your computer and use it in GitHub Desktop.
Delegate example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment