I'm wondering if there is a difference between using a Lambda expression and the delegate anonymous keyword type. Is one preferred over the other? From what I've seen both seem to be interchangeable.
public delegate void SomeDel(string input);
public class myClass
{
private ObjWithDel myObj;
public myClass()
{
// Lambda Case
myObj.DoDel += (val)=>{textbox1.Text = val;}
// delegate keyword case
myObj.DoDel += delegate(string val){textbox1.Text = val;}
}
}