We, all C# developers are very much familiar with
string.Format(); in C# where we used to
that was awesome but when it comes to use the same methods with more args, it gives a headache and even its sometimes become harder to read the code. Sometimes I personally think why again and again use
string.Format();. Now with the new C# Microsoft has provided me an answer that is, String Interpolation. With String interpolation you can just use something like
and even you can depricate that
Console also as C# has the feature to using static classes as I said earlier in a blog post.
The next thing I wanted to tell here is Expression bodies methods and properties in C# 6.0, they are just methods, where body contains just a single return statement, for example the like the below.
and think about how to write this method very quickly to boost the developer efficiency, there is were the expression bodied methods helps. Like Lambda expressions, this expression bodied methods helps to implement a methods with lambda arrow. A good example can be
thats all boom…!!
And we can use this for properties as well, instead of using like below
we can just use
These are just cool isn’t they.
Happy coding and I will catch you soon with another post guys. Have a blessed stay.