Visual Studio 2015 Tips And Tricks

In this article you will learn about some Visual Studio tips and tricks for better performance and efficiency of your code.

How to change the font size in Visual Studio 2015

  • Ctrl+shift+ . is used to increase the font size.
  • Ctrl+shift+ , is used to decrease the font size

How to move some rows or shifting the rows

If we want to shift rows or something to other location within the same file then we'll use AltUp and AltDown

Why we use Lazy code snippets

The purpose of lazy code snippets is to reuse your code. You can use it again and again. If you write some code and you know that in future you'll use this code in that project or some other project than you just need to place your code in toolbox and name it whatever you want.

Next time when you'll want that code you simply drag drop your code from ToolBox and your code will be created automatically .

How to insert comments in Visual Studio 2015

Ctrl+KC for inserting comments and if you want to uncomment them then you'll use Ctrl+KU .

How to add Summary in your Visual Studio Code?

You just need to enter /// before your method in Visual Studio and it will create your method summary automatically.

How to add Properties in Visual Studio

Simply type prop and hit two times Tab button and your method will create automatically. Now what you will need is just give method name whatever you want. You can save your precious time by simply using that kind of techniques.

How to declare variables and add properties with return values

Just like prop + Tab + Tab you can now write propfull +Tab +Tab button.

What can I do if something misplaces and close or replace

Well don't confuse and just go to the Quick Launch TextBox that's on the top right corner of Visual Studio 2015 window and simply write your control name and choose it.

Suppose you are working on Visual Studio and suddenly you close your Solution Explorer and you don't know from where to bring back that solution explorer then you just type solution explorer in the top right corner of Visual Studio and select it from a drop down list that'll appear after your query.

 

How to change text Vertically

Lets take a simple example suppose you want to add some properties in your code and after this you want to copy only your property name. Here you stuck in problem. If you select your code it'll select all properties code.

A question arise here what you'll do

Visual Studio provides here an interesting feature i.e. you simply select your code by just pressing ALT then select your code whatever you want.


Now copy your selected code and try to paste somewhere. You'll notice that only selected code will copy.

How to format your code design

Suppose you want to create some code in the following form that looks clumsy. You'll clearly see that this code has no flow. It's difficult for someone who wants to read your code and sometimes you  are in trouble by using that kind of code in your project.

So simply select your code and just press Ctrl+K D and your code looks marvelous. Now you can easily read your code or dive it to someone because your code has now proper flow.