Comment on C# almost has implicit interfacesComments−SideburnsOfDoom2yIn other words: an interface with one member is equivalent to a function reference.There is an equivalence between public interface IThingDoer { int DoTheThing(int value); } and Func<int, int> doTheThing.Converting from one to the other is left as an exercise to the reader.
Comments
In other words: an interface with one member is equivalent to a function reference.
There is an equivalence between public interface IThingDoer { int DoTheThing(int value); } and Func<int, int> doTheThing.
Converting from one to the other is left as an exercise to the reader.