Visual Studio 2019 Development

Visual Studio Development Tips to Speed Up Development

  1. Enable CodeLens Feature in Visual Studio 2019:
    CodeLens allows you to turn on or off settings about Application Insights. The Visual Studio will show you how many references to the function are. This helps in making a discission whether you even need the function or not.
    - To enable Settings from CodeLens go to Tools => Options => Text Editor

    Visual Studio Code Lens
     
  2. When starting to use Visual Studio, sometimes you don't want the browser to stop debugging or detach from the process.
    - Every time you stop debugging and then refresh the browser the application stops showing because the IIS process is terminated

    Solution:
    - The way you solve this problem is: When debugging, don't stop debugging with a big red button (stop) instead navigate to the Debug menu and click on detach-all, this will leave the application running in the background so you can do your modification to the page and still see the changes in the browser.

    Short-Cuts in Visual Studio

  3. Ctrl + left arrow => To pad or apply formats to the code
  4. Ctrl + L => Cut the lines trailing in between code. Compacts the code together
  5. Ctrl + Space Bar => to See the properties of a DTO/POCCO object in C#
  6. Ctrl + RR => to rename every instance of the property or variable name at once
  7. Ctrl + f12 => to step into the C# Library code
  8. Highlight + Tab => to format or move code four spaces in
  9. Alt + Click + Drag => Muiltiple Code Selection
  10. Ctrl + T => to bring up a Slick Search bar that will allow you to search Fils, Words in Classes, and many more.

    Aligning the Code

  11. Tab => Select a block of code and hit "Tab" to move the code right
  12. Shift + Tab => Select a block of code and hit "Shift + Tab" to move that block of code left.




    C#

  13. When using Linq, you can use object.Any(pass in an expression) just like you would use a Were Close to check whether the query does contain any data. This can be used when you want to be sure that the query will retrieve data.
  14. cw => will automatically write Console.Writeline() code If you are developing a Console Application

Edit this Article
C best practices Visual Studio 2019 Tips and Tricks Tools published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy