Say I have private field in a class. If I tell Visual Studio to encapsulate the field with a property, it outputs lambda expressions for the get and set accessors.
namespace MyNamespace
{
public class MyClass
{
private bool isActive;
//Auto-Generated Property
public bool IsActive
{
get => isActive;
set => isActive = value;
}
}
}
But I would rather have a pair of braces for each accessor.
namespace MyNamespace
{
public class MyClass
{
private bool isActive;
//Auto-Generated Property
public bool IsActive
{
get
{
return isActive;
}
set
{
isActive = value;
}
}
}
}
How can I change the behavior? I know the snippets exist here: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC#\Snippets\1033\Refactoring" But I can't figure out how to change them to get the behavior I want.