To reproduce:
public class StaticToString
{
protected static new string ToString() => "c";
}
public static class Test
{
public static void Go() => Rock.Create<StaticToString>();
}
This causes CS0176 and CS0506. Basically, ToString() is new and also static (though if you remove static the same problem happens) so it can't be overridden.
This was found with Microsoft.EntityFrameworkCore.Storage.ValueConversion.TimeSpanToStringConverter.
To reproduce:
This causes
CS0176andCS0506. Basically,ToString()isnewand alsostatic(though if you removestaticthe same problem happens) so it can't be overridden.This was found with
Microsoft.EntityFrameworkCore.Storage.ValueConversion.TimeSpanToStringConverter.