I'm trying to user the Union type in Language-Ext and am getting error: "Target runtime doesn't support default interface implementation" for the method name and "The type or namespace name 'InconsistentFirstName' could not be found"
My code looks like this:
[Union]
public interface Inconsistency
{
public Inconsistency InconsistentFirstName(string localValue, string contactCentreValue);
public Inconsistency InconsistentSurname(string localValue, string contactCentreValue);
public string GetFieldName(Inconsistency inconsistency)
=> inconsistency switch
{
InconsistentFirstName n => "Name",
InconsistenctSurname s => "Surname",
_ => ""
};
}