Local Functions in C# 7.0

One of the new features of C# 7.0 is support for local functions. Local functions are methods that are defined inside other methods to simplify more complex code and by example to support local recursion. This blog post shows how to use local functions in C# 7.0 and gives some advice in context of technical design of code.

To illustrate local functions I will use the example of finding a factorial.

Link: https://dzone.com/articles/local-functions-in-c-70?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev