Consider the following:
public void Step(Action code){}
To reuse this I typically pass a lambda expression through like this:
tr.Step(() => StaticType.SomeMethod(someParameter);
While at other times I can simply pass a void function without using a lambda expression :
tr.Step(SomeNonStaticType.SomeMethod);
Where SomeMethod is :
public override void SomeMethod(){}
Can someone please explain this to me?
EDIT: To be clear both have void return types. EDIT 2: If I'm asking these questions what book should I be reading (in the comments please).