문제

Is there a shortcut or menu-option to convert a prop snippet?

 public string SomeProperty { get; set; }

to propfull snippet

private string _someProperty;
public string SomeProperty
{
get { return _someProperty;}
set { _someProperty = value;}
}

It would come in handy to add extra functionality.

도움이 되었습니까?

해결책

There is nothing in Visual Studio that does this (as far as I know). Resharper has a "To property with backing field" refactoring though.

다른 팁

I know this was 8 Years ago but i found an answer

Go to Tools > Options

Set this to 'Never'

Then go to your property and press Ctrl + .

And choose 'Convert to full property'

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top