Let's say I have the following three classes / interfaces:
public interface IImportViewModel { } public class TestImportViewModel : IImportViewModel { } public class ValidationResult<TViewModel> where TViewModel : IImportViewModel { }
How TestImportViewModel implements IImportViewModel, why the following does not compile?
ValidationResult<IImportViewModel> r = new ValidationResult<TestImportViewModel>();
I understand that the error message โIt is not possible to implicitly convert the typeโ ValidationResult โtoโ ValidationResult "means. I just donโt understand why this is so. Would it be covariance?
source share