How to implement methods and classes by some keyboard shortcut in visual studio?

4

I need to implement methods and classes " by keyboard " to get a value automatically.

  

1: Implement Interface methods in the Start class:

class Inicio : Interface
{

}
  

2: Put Get and Set automatically:

private static RichTextBox rtb
{
     Get { return; }
     Set { value = value; }
}
    
asked by anonymous 19.01.2018 / 10:47

1 answer

6

What Visual Studio provides for you, are the Code Snippets .

With this feature, you are able to create several different types of code snippets.

Within the scope of a class, by enabling Code Completion , you can filter all available snippets .

OnethatIusealotisctorwhichcreatesaconstructorfortheclass.

Fortheimplementationofacompleteproperty,youcanusepropfull.Thatitwillcreatethefollowingimplementationforyou:

privateintmyVar;publicintMyProperty{get{returnmyVar;}set{myVar=value;}}

TouseSnippet,youcantypeitnormallyandafterpressingTabonyourkeyboard.

Thereisnomagic,somethingyouwillhavetotypetobeabletousefeaturesthatacceleratedevelopment.

Anotherinterestingfeaturethatcanhelpyoualot,is Quick Actions , which can be fired with the shortcut Ctrl+. .

    
19.01.2018 / 11:28