me.at.coding
me.at.coding

Reputation: 17634

Visual Studio C# Code formatting remove superfluous empty lines?

Consider the following code with unnecessary empty lines:

static async Task DemoAsync()

{

    var d = new Dictionary<int, int>();

    for (int i = 0; i < 10000; i++)

    {

        int id = Thread.CurrentThread.ManagedThreadId;

        int count;

        d[id] = d.TryGetValue(id, out count) ? count + 1 : 1;



        await Task.Yield();

    }

    foreach (var pair in d) Console.WriteLine(pair);

}

Using the formatting (Edit->Adavanced->Format document) in Visual Studio 2019 does not remove these empty lines. Any setting or plugin that does this?

Upvotes: 1

Views: 726

Answers (1)

nf313743
nf313743

Reputation: 4227

https://www.codemaid.net/ will help with some formatting here.

Upvotes: 1

Related Questions