“Expression-bodied methods” were introduced with C# 6.0, that simplify the syntactic expression for methods in C#. C# 7.0 extend this features for several new members including constructor, destructor, property assessors etc, and we have seen this one of our previous post – Expression – Bodied Members in C# 7.0. C# 7.0, also introduced local function by […]
During development, often we use literal in our code. They are the fixed values which may not alter during the code execution. Sometime these values are large, and sometime small. If it is small, it’s ok. If it long representation, it could be hard to read. Making them separate could help read them better. C# […]
In C# 7.0, you can now have your helper function defined with in the method itself. The local function can access all the local variables, and can also make use of lambda expression or even async-await. However, They aren’t available outside though.
In C#, we often used Out parameter, as like call by reference, mostly when we want to return multiple values from a method. Whenever we call a method with an Out parameter, we must have to declare that variable first, before we use it. Now, with C# 7.0, we can directly declare the Out Variable […]
Expression-bodied methods was introduced with C# 6.0, that simplify the syntactic expression for methods in C#. We have seen this for Methods and Properties in the previous version of C#. C# 7.0 extend this features for several new members including constructor, destructor, property assessors etc.