I have a C# viewmodel to which I'm passing a generic type in the constructor:
public ViewModelTestPage(IIncrementalLoadingHelper<MessageDTO> incrementalLoadingHelper)
{
IncrementalLoadingHelper = incrementalLoadingHelper;
}
In my ViewModel base class I have the following property:
public IIncrementalLoadingHelper<BaseDTO> IncrementalLoadingHelper {get; set;}
MessageDTO inherits from BaseDTO.
On the line which sets IncrementalLoadingHelper = incrementalLoadingHelper, I'm getting an error:
Cannot implicitly convert type
IIncrementalLoadingHelper<MessageDTO>toIIncrementalLoadingHelper<BaseDTO>. An explicit conversion exists (are you missing a cast?)
I probably am missing a cast, but I have no idea how to do this. Could someone point me in the right direction, please?