Skip to content

Style preferences to include this. don't work in ctor #32093

@vsfeedback

Description

@vsfeedback

A constructor calling its base class' constructor can't use this., but auto-formatting applies the chage.

public class Base{
  public string Name{get;}
  public Base(string name){...}
}

public class Child: Base{  
  public Child():
     base(AppContext.GetValueFor(nameof(this.Name)){
}

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/415902/style-preferences-to-include-this-dont-work-in-cto.html
VSTS ticketId: 757067

These are the original issue comments:

Jinu Joseph [MSFT] on 1/1/2019, 05:31 PM (17 hours ago):

We appreciate you taking the time to report this problem. We are currently prioritizing problems that are impacting a broad set of our customers, so we may not be able to investigate this one immediately. We know this problem is important to you, so we will continue to monitor it.

These are the original issue solutions:
(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comResolution-FixedThe bug has been fixed and/or the requested behavior has been implemented

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions