Created
November 19, 2015 16:58
-
-
Save manuelleduc/171b10be82b5bb25de0f to your computer and use it in GitHub Desktop.
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
using System; | |
namespace test2 | |
{ | |
public delegate void CallSuccess(); | |
public delegate void CallError(String e); | |
public class Service | |
{ | |
public void success(CallSuccess ok, CallError error) { | |
ok(); | |
} | |
public void error(CallSuccess ok, CallError error) { | |
error("Error message"); | |
} | |
} | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
new Service ().success (() => { Console.WriteLine("ok");}, (e) => { Console.WriteLine("error : " + e); }); | |
new Service ().error (() => { Console.WriteLine("ok");}, (e) => { Console.WriteLine("error : " + e); }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment