Category Archives: Tips

Expression Bodied Local Function in C# 7.0

By | August 4, 2017

“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 defining the helper… Read More »

Improve code readability using Digit Separator in C# 7.0

By | August 3, 2017

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# 7.0 allows ‘_’ (underscore) in… Read More »

Directly throw Exception as an Expression – Throw expressions in C# 7.0

By | July 31, 2017

In one of our previous post, Expression – Bodied Members in C# 7.0 , we have seen how C# 7.0 extended the expression bodied members features for several new members including  constructor, destructor, property assessors etc. C# 7.0 also introduces throw expressions, using which you can now throw an exception along with expression-bodied members, conditional expressions or even null-coalescing operations.… Read More »

Did you know – you can just “copy the code” as well from C# Interactive Window ?

By | July 25, 2017

The Interactive Window in Visual Studio is a great utility to play around the code, language features, API’s and other .NET framework features.   The Interactive Window also support features like IntelliSense, syntax highlighting and navigating through executed commands. Previously we have seen several tips around the C# Interactive Window, but there is one very interesting feature you… Read More »

How To customize “Structure Guide Lines” Colors in Visual Studio 2017 ?

By | July 21, 2017

In Visual Studio 2017   dotted structure guide lines in your code, between the curly braces ({}), helps in identifying the individual blocks easily.  Also, hover over on the lines, it will shows the tooltip with opening of that block and its parents. In the previous post we have seen how to Turning On/Off “Structure Guide Lines” in… Read More »

Turning On/Off “Structure Guide Lines” in Visual Studio 2017

By | July 20, 2017

Visual Studio 2017 introduced an interesting feature that draw a dotted structure guide lines on your code.  It draw a dotted vertical line between the curly braces ({}) to identify the individual blocks easily.  If you hover over on the lines, it will shows you a tooltip with the opening of that block and its parents.