Version Used: VS 16.6-p1
There should be no prompt to remove the enum cast. Removing it would change the exception message.
_ indicates faded text:
class C
{
object M(int rawKind)
{
// ℹ IDE0004 Cast is redundant
// ____________
return (SyntaxKind)rawKind switch
{
var kind => throw new NotImplementedException(kind.ToString()),
};
}
}
Version Used: VS 16.6-p1
There should be no prompt to remove the enum cast. Removing it would change the exception message.
_indicates faded text: