Property Generation and coding style
Hi,
Developping in C# with Resharper, I set it up to use the BSD style for all braces layout. When I create a new property named Foo into my code, using the context Menu (Alt + Enter) and "Create Property 'Foo'", firstly, it creates the following property :
protected int Foo
{
get { throw new NotImplementedException(); }
set { throw new NotImplementedException(); }
}
Then, when I choose "Create and use 'foo' as backing field" I have the following output which is not the specified one :
protected int Foo
{
get {
return foo;
}
set {
foo = value;
}
}
If I reformat the code, I have the correct output :
protected int Foo
{
get { return foo; }
set { foo = value; }
}
I noticed, there is no problem changing the member generation to "Not compiled code" instead of "throw new NotImplementedException()". But I prefer to use the the exception generation.
Is there a way to get the right output without changing the member generation option and without reformating the source code ?
Thanks.
Here are my resharper information :
JetBrains ReSharper 5.1 C# Edition
Build 5.1.3000.12 on 2011-01-28T04:05:56
Licensed to: XXX
Plugins: none.
Visual Studio 10.0.40219.1.
Please sign in to leave a comment.