Author Archives: WindowsDebugging

C# 7.0 – Tuples Re-Engineered

Tuples have been around for quite sometime as a convenient way of returning more than one value from a method. Even though Tuples were quite easy to use but from code-readability perspective, there were certainly room for improvement. In C# 7.0, team … Continue reading

Posted in .NET, CodeProject, Visual Studio 2017 | Leave a comment

Visual Studio 2017 – Simplified Object Initialization

Visual Studio 2017 introduced code refactoring to simplify object initialization. Let’s say we have following class called Bar. And here is how this class is consumed. Notice the Gray dots under the new keyword in this picture. This is an indication that … Continue reading

Posted in Uncategorized | Leave a comment

Visual Studio 2017 – Add Braces

Visual Studio 2017 code refactoring improvements also made it easy to adapt to some best practices. One of those is adding braces around your code blocks. Let’s say you have code as follows. There are quite a few if -else conditions handled here … Continue reading

Posted in Visual Studio 2017 | Leave a comment

Visual Studio 2017 – Structure Visualizers

Structure Visualiser is one of the  popular features from Productivity Power Tools in 2013 and 2015 versions. Good news is that with Visual Studio 2017, the Structure Visualiser comes out of box without need to install anything. In case you don’t … Continue reading

Posted in Visual Studio 2017 | Leave a comment

Visual Studio 2017 Code Refactoring – Convert Property To Method

Sometimes you start with creating a class property but later you realised that there is much more work in that property and it’s better to have it as a method. Visual Studio 2017 converting a property to a method quite trivial. … Continue reading

Posted in Visual Studio 2017 | Leave a comment

Visual Studio 2017 Code Refactoring – Sync up Class and File names

Sometimes your C# file name and class name are different for whatever reason and you want to fix it. The usual way of “fixing” this issue is either by renaming the file name in solution explorer or changing the class name … Continue reading

Posted in Uncategorized | Leave a comment

Visual Studio 2017 Code Refactoring – Moving a class into its own file

Visual Studio 2017 has introduced new quick ways to refactor your code. One such refactoring is about moving a class in a new file. There are use cases when a developer may have created many classes in a single file. As … Continue reading

Posted in Visual Studio 2017 | Leave a comment