Replace Enum ToString() with nameof.

Why is this an issue ?

When using the Enum ToString() syntax to convert an enum value to a string, without any specific format, the result will be the same as using the nameof(value) syntax. While the first one is resolved at runtime and requires some work, the latter is resolved at compile time and is much more efficient.

When can it be ignored ?

This rule should not be ignored.

Non compliant example

private enum Letter { A, B, C }

public void Main()
{
    Console.WriteLine(Letter.A.ToString()); // Non-compliant, use nameof
}

Compliant examples

private enum Letter { A, B, C }

public void Main()
{
    Console.WriteLine(Letter.A.ToString("D")); // Compliant, the string format impacts the result
}
public void Main()
{
    Console.WriteLine(nameof(Letter.A)); // Compliant
}