[VS2017] Is there a way to create snippet which inserts view model PropertyName with backing field _propertyName?

I need to create snipper which inserts pascal case propery with underscore starting backing fileld name.

What I need is to have snippet for property like this where I only need to type property name and type.

private string _logContent; public string LogContent { get => _logContent; set => Set(() => LogContent, ref _logContent, value); } 

I only achieved this:

private string _LogContent; public string LogContent { get => _LogContent; set => Set(() => LogContent, ref _LogContent, value); } 

Because there is no way in standard snippets to transform one snippet variable to another snippet variable with lowercase start letter.

I know resharper templates can do that but we don’t have it at work. Is there any VS extension for better snippets?

submitted by /u/toomasz
[link] [comments]

Leave a Reply