This page shows the posts published with the category 'Visual Studio'
As a programmer, you often have to debug your code, or the code written by a coworker. I don't like debugging, but as you know: If debugging is the process of removing bugs, then programming must be the process of putting them in. Unless you are extraordinary developer, you'll need to debug your code. Visual Studio provides great tools to help you in this task. The main features are breakpoints, step by… [read more]
C# 7 has introduced new features: pattern matching, our variables, tuples, and many more. It's also introduced throw expression. This allows to use the throw keyword in an expression. For instance: _foo = foo ?? throw new ArgumentNullException(nameof(foo)); parts.Length > 0 ? parts : throw new InvalidOperationException(); Adding new syntaxes is great, but I clearly don't like this one to check the… [read more]
With the advent of ORMs such as Entity Framework, developers often forget the issues related to database developments. Indeed, ORMs and similar tools often deal with generating the schema (tables, columns) of the database as well as generating SQL queries without the developer writing a single line of SQL. Although this is very practical, a database is not limited to just that. There are stored… [read more]
Here is a little trick to remove spaces and tabs at the end of lines. Open Quick Replace (Edit / Find and Replace) Text to be searched: (:b+)$ Search Options: Use regular expressions Replace all There you go. [read more]
In the solution explorer you can see nested files: Let's see how to do the same with the two files Class1.cs and Class1.Custom.cs. The trick is in the project file (csproj). You need to look for the Class1.Custom.cs file in it and indicate which item is its parent.
And here's the… [read more] Class1.cs