I just noticed that when you try to generate a method stub on code where there are more {
than }
, the method stub gets generated incorrectly.
For instance:
static void Main(string[] args) {
myMethod();
}
creating a method stub for myMethod()
expands correctly into:
static void Main(string[] args) {
myMethod();
}
private static void myMethod() {
throw new NotImplementedException();
}
However! If I now continue and add:
{
newMethod();
And try to generate a method stub for newMethod()
, I get this:
static void Main(string[] args) {
myMethod();
{
newMethod();
}
private
private static void newMethod()
{
throw new NotImplementedException();
} static void myMethod() {
throw new NotImplementedException();
}
}
Can I configure Visual Studio somehow as to do it correctly? Or is this something that would have to be reported to someone?