Skip to content

Instantly share code, notes, and snippets.

@josephwoodward
Created May 11, 2015 16:17
Show Gist options
  • Save josephwoodward/57cf98175db919ace91e to your computer and use it in GitHub Desktop.
Save josephwoodward/57cf98175db919ace91e to your computer and use it in GitHub Desktop.
Delegate
using System;
using System.Linq.Expressions;
namespace ExpressionDemo2
{
internal class Program
{
private static void Main(string[] args)
{
var myClass = new ExpressionTest();
// Ambig.
myClass.TestMethod(myExpression1: x => x.ToString() );
//myClass.TestMethod();
}
}
public class ExpressionTest
{
public void TestMethod(Expression<Action<string>> myExpression1)
{
}
public void TestMethod(Action<string> myExpression2)
{
}
/*public void TestMethod(Action myExpression)
{
}*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment