Reputation: 17634
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