Visual Studio Tip #9: You can edit directly in the Diff tool

Here is one I just discovered just last week by accident. When you are doing a diff on a file to compare what has changed from the source control, the diff window can be used to edit the file directly. (works on both Git and TFS source control) I always assumed the window was just…

3

Visual Studio Tip #8: Adding existing files with Show All Files

Sometimes instead of adding a new file to your project, you need to reuse an existing file. That might be code, but often it is some sort of content like a bitmap or an xml document. I’ve seen new users copy that item into their project directory and then look at their project in Visual…

3

Visual Studio Tip #7: Whole line editing

OK here is a quick simple one. How do I move or edit entire lines of code? #1 Just don’t select anything. If you don’t have anything selected in your code window then the commands for copy, cut and paste work as if the entire line of code was selected. So if you need to…

5

Visual Studio Tip #6: Turn on those line numbers (with Quick Launch)

Writing code is very often a collaborative process and to discuss something you need to be able to refer to it. The simplest way to refer to a line of code is “look at line #26.” For some reason though, line numbers are not on by default. Before Visual Studio 2013 (which syncs your preferences…

5

Visual Studio Tip #5: Quickly adding a namespace “using” statement

One thing that slows down new C# users is the requirement to add “using” statements to the top of your file. This is because they just want to declare a variable and use it but aren’t necessarily familiar enough with the classes and namespaces to have predicted the need for the namespace when they were…

0

Visual Studio Tip #4: Code Snippets

There is lots of code that we write that follow standard patterns with some minor changes for our exact situation. Visual Studio has a nice feature called Code Snippets which provides a way to create reusable code templates for common scenarios. The idea is that you activate the snippet, then just enter the needed values….

0

Visual Studio Tip #3: Use “Navigate To”

I spend a lot of time looking at other people’s code. That means a lot of time searching other people’s code. One of the main tools I use is not Search but “Navigate To”. It is found on the Edit menu or you can use the keyboard shortcut “Ctrl + Comma” to bring up this…

0

Visual Studio Tip #2: Pin your data tips

Most people know that when you are debugging, you can hover the mouse over a variable in your code and the tool tip will provide you the current value. For example, if I hover over the “uri” variable below it shows me that it’s current content is “http://azure.microsoft.com/” That is very helpful, but what if…

1

Back to basics: Visual Studio tips

Lately I’ve been working a lot with developers who are completely new to C# and/or Visual Studio. So I’ve been trying to gather some features and workflows which I’ve seen new users overlook which will make them a little more productive. A large amount of “a little more productive” turns into  “very productive” very quickly. …

0

Windows 8 ViewModel Property Code Snippet

Visual Studio provides a bunch of good code snippets for creating boilerplate code. For example if you type “prop” you get this in intellisense   You’ll see a few nice property snippets. prop – creates a basic automatic property propa – creates an attached property propdp – creates a dependency property propfull – creates a…

0