Open Newex opened 6 days ago
Or maybe have the syntax similar to JsonDerivedType
attribute in System.Text.Json.Serialization
namespace.
[PartialDerivedType(typeof(PartialPerson))]
public class Employee : Person
{
}
Although I cannot imagine how this would be implemented due to the extra arguments existing in Partial
attribute.
What? Given an abstract class and a derived type have a partial class that inherits from the partial abstract class.
Example:
Why?
So you can have a more generic method that accepts the abstract partial class.
Example: