Change C# create property from variable identation

Diogo.2095Diogo.2095 USMember
edited May 2015 in Visual Studio

Is there a way to change the indentation of create property refactor from this :

public int VarA
    {
        get
        {
            return varA;
        }
        set
        {
            varA = value;
        }
    }

To something like this:

public int VarA
    {
        get { return varA; }
        set { varA = value; }
    }

this is some convention in my current project, and it's removing always the new lines and spaces. I know that I can use prop snippet, but I preferred the other way because this way I would risk writing the wrong name of the variable.

Thanks in advance

Tagged:

Answers

  • MikeKrgerMikeKrger DEXamarin Team, Beta Xamurai

    Currently no - only the formatting settings are taken and atm we do not have a setting to force properties formatting like that.

  • Diogo.2095Diogo.2095 USMember

    Thanks for the answer.

    I found sort of workaround. I edited the format of c# in the braces category -> properties declaration. It does not format after generating the property, but when called the autoident it will stay just like the way I wanted :)

Sign In or Register to comment.