- #1
pairofstrings
- 411
- 7
- TL;DR Summary
- This code shows compile-time error.
Hi. I have the following code:
How to remove the compile-time error without changing the code of method declaration and by only changing the interface signature?
The error is in:
Thanks.
C#:
public interface ICovariance<out T>
{
void Add(T item);
T Get();
}
How to remove the compile-time error without changing the code of method declaration and by only changing the interface signature?
The error is in:
C#:
void Add(T item);
Thanks.
Last edited: