So, if I have something like this:
if (a>b) return true;
and I decided later that I want to change it to this:
if (a>b) { a++; return true; }
Is there a faster way to have existing code under an if statement directly in newly made curly braces? Since at present, if I were to add curly braces after creating the if statement in the first example, I would have to cut out βreturn trueβ from the new curly braces and paste it between the newly created curly braces. It looks like this:
if (a>b) { } return true;
and it is quite annoying. Is there a fix or should we manually copy and paste the existing line between the brackets?
PS I am using Microsoft Visual Studio 2015 ver 3 and programming in C #, but I think that this problem also occurs in other languages, for example, in C ++.
source share