R#4 Request: convert Auto property to property

cannot find a conversion to refactor an auto property to explicit property:

public string Username { get; set; }

-->
private string _username;
public string Username
{
get { return _username; }
set { _username = value; }
}

1 comment
Comment actions Permalink

Hello oribolzi,

place cursor on property name and press Alt-Enter. Then select 'To
property with backing field'.

Regards,
Stefan Lieser
--
http://www.lieser-online.de

oribolzi schrieb:

cannot find a conversion to refactor an auto property to explicit property:

public string Username { get; set; }

-->
private string _username;
public string Username
{
get { return _username; }
set { _username = value; }
}

0

Please sign in to leave a comment.