Tag Archives: delegate

Swift events

Swift does not have built-in .NET-like events. (I admit, I was used to have them in C#, although implementing the weak pattern in .NET was not the easiest job either.) Instead, in Swift there are two common patterns that developers (and even Apple) … Continue reading

Posted in Swift | Tagged , , , , , | 1 Comment

Expression vs. delegates

Using LINQ lambda expressions is fun. But did you know that lambdas can be viewed either as delegates or as expression trees? Specifically, both lines from the following snippet compile successfully: Func<double, string> f = v => v.ToString(); Expression<Func<double, string>> fe = v … Continue reading

Posted in .NET, C# | Tagged , , , , | Leave a comment