You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a warning with a derived class. The base class I'm deriving from contains:
public void Write(params string?[] columns) { ... }
public void Write(IEnumerable<string?> columns) { ... }
And my derived class contains:
public new void Write(params string?[] columns) => base.Write(FilterColumns(columns));
public new void Write(IEnumerable<string?> columns) => base.Write(FilterColumns(columns));
But the second Write() method in my class gives a warning.
Change or remove 'RailtraxCore.TableColumns.HiddenColumnsCsvWriter.Write(System.Collections.Generic.IEnumerable<string?>)' because it hides a more specific base class method: 'SoftCircuits.CsvParser.CsvWriter.Write(params string?[])'
I don't understand the reason for this. Yes, the base class has the more specific version. But it won't be called if IEnumerable<string> is the parameter type. So why would this be a warning?
The text was updated successfully, but these errors were encountered:
I'm getting a warning with a derived class. The base class I'm deriving from contains:
And my derived class contains:
But the second
Write()
method in my class gives a warning.I don't understand the reason for this. Yes, the base class has the more specific version. But it won't be called if
IEnumerable<string>
is the parameter type. So why would this be a warning?The text was updated successfully, but these errors were encountered: