![]() If you know any cool shortcut that's cool, please let me know in comments. It takes me to the original place where it defined. That's it! The reference window will be open.Īnd, if I'm going through code and want to know the definition of a member like Class, Variable, or a Method, I just click on it and hit F12. If I'm working on a gigantic codebase with multiple project files in a solution and I want to see all the references of a particular member like Class, Method, Variable, or Properties, I just click on that member and do Shift + F12. And also, if you are generating code snippets using the double-tab method, most of the code will auto-aligned. So, I just do Ctrl + K + D after writing the code and it is aligned. ![]() It is difficult to identify which part belongs to other parts of the code. Often writing code, it tricks me if my code is not aligned properly at all. You can assign a shortcut to a Label control, in such a case next tab-ordered control will be activated. For example, once you have &Edit, you can have E&xit buttons with Alt+E and Alt+X shortcuts respectively. So, I just useĬtrl + K + C for commenting and Ctrl + K + U for uncommenting. Assigning the same shortcuts to several controls is ambiguous, but you can use any letter in the label to be a shortcut. And this requires commenting-uncommenting the lines. ![]() Often writing code, I would like to make tweaks while testing. If I want to write a switch-case for all values present in a very tall enum (an enum with a huge list of entries), I just generate the switch-case template using my trick of Double-Tab, enter the enum name in the switch-on place and Click on the default keyword just once. If I want to write a class, a constructor, a for-loop, etc, I just type the keyword and hit TAB twice. But I'm going to list down the 5 shortcut keys that I use the most to increase my programming speed. Keyboard shortcuts are my favorite and there just so many I love. They are there already, configured by default when you install a fresh copy of Visual Studio (any version). And one more cool fact about these is you don't have to do anything in the settings to enable it. Using shortcut keys is not just cool but also increases productivity. I have been coding in C# on Visual Studio for almost around 8 years and I have realized using some of the keyboard short keys while writing the code is just so fast than using a mouse and going around options to click.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |