Reputation: 14417
I'm using the latest ReSharper - 9. I also have StyleCop installed as well.
When I implement an interface with properties it does this:
public class MyClass : IMyClass
{
public bool MyProperty
{
get
{
}
set
{
}
}
}
I want it to implement like this:
public class MyClass : IMyClass
{
public bool MyProperty { get; set; }
}
Exactly how do I set this up?
Upvotes: 1
Views: 179
Reputation: 175
I had a similar thing happen on Resharper 9, and I found this related bug in the Resharper issue tracker. Installing the update fixed it for me. Also you could try the Alt + Insert workaround as mentioned on that bug.
Upvotes: 2
Reputation: 956
When you tell ReSharper to 'Implement Missing Members', there's a dropdown in the form that appears called 'Properties As:'. If you set this to Automatic property, it will generate properties in the manner you want them to. It looks like you currently have it set to 'Property with backing field'.
Upvotes: 0