Skip to content

Instantly share code, notes, and snippets.

View ajepst's full-sized avatar

Anne Epstein ajepst

View GitHub Profile
public void DoStuff(string message, Func<string> logThing)
{
myLogger(message);
// do other stuff
}
DoStuff("hello world", q);
q(“my message”);
Action<string> q = x => System.Console.WriteLine("Error: " + x);
public void DoStuff(string message, Del logThing)
{
myLogger(message);
// do other stuff
}
DoStuff(“hello world”, myLogger);
myLogger("Hi this is a message from your friendly delegate!");
MyDel myLogger = LogMethod;
delegate void MyDel(string x);
public static void LogMethod(string myText)
{
var modifiedText = "Error: ";
System.Console.WriteLine(modifiedText + myText);
}

Keybase proof

I hereby claim:

  • I am ajepst on github.
  • I am ajepst (https://keybase.io/ajepst) on keybase.
  • I have a public key whose fingerprint is D4A9 3A69 8DD4 3858 FF94 A1A6 90EC A1A7 D1DB BA1D

To claim this, I am signing this object: