In eclipse there is option to generate block of commands when you press enter for example if I put the command for there is popup with for,foreach etc and when I choose for example the command foreach it generate for me for each block with the context the im in and I can change it as I like . Im using visual studio premium edition 2012 ,do I need to type all the block for every command ????
The feature that you are talking about is called snippets in Visual studio environment.
Eg.
If you wanna insert a property, you do something like this:
prop and press tab twice, the IDE produces something like,
public int MyProperty {get;set;}
leaving you to edit the just-created property by navigating (use tab key).
Something like svm and tab twice, you get a public static void main method snippet produced by the IDE.
static void Main(string[] args)
{
}
For a list of all already available code-snippets, look here You can also create your own custom code snippets and use as you wish. Refer here
I asked a similar question at stackoverflow. Hope this gets you started.
If you type 'for' and press 'TAB' twice Visual Studio will generate the code block for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With