Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line wrapping and indentation of Collection Literals #2174

Open
ignatz opened this issue Apr 25, 2024 · 0 comments
Open

Line wrapping and indentation of Collection Literals #2174

ignatz opened this issue Apr 25, 2024 · 0 comments

Comments

@ignatz
Copy link

ignatz commented Apr 25, 2024

Output of running dotnet format with default config:

class Foo { }

class Program
{
    public static void Main()
    {

        List<List<Foo>> list = [[
          new Foo(),
            new Foo(),
            new Foo(),
        ],
            [
          new Foo(),
                new Foo(),
            ],
        ];

        Console.WriteLine($"Hello {list}");
    }
}

Just for some inspiration, the same program in dart:

class Foo {}

void main() {
  List<List<Foo>> list = [
    [
      Foo(),
      Foo(),
      Foo(),
    ],
    [
      Foo(),
      Foo(),
    ],
  ];

  print('Hello ${list}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant