3 ms·
Could you combine copilot with an updated linter or similar? In Visual Studio the intellisense does a pretty good job of converting my manually-typed old way of
by SamuelAdams 5y ago
Could you combine copilot with an updated linter or similar? In Visual Studio the intellisense does a pretty good job of converting my manually-typed old way of doing things code into a newer, simpler version supported by newer releases of C#.
Example:
using (var reader = new StringReader(manyLines))
{
string? item;
do {
item = reader.ReadLine();
Console.WriteLine(item);
} while(item != null);
}
becomes:
using var reader = new StringReader(manyLines);
string? item;
do {
item = reader.ReadLine();
Console.WriteLine(item);
} while(item != null);
- st1ck 5y agoso it just flattened the code by removing parentheses and braces around `using`? Looks like a really simple transformation.