我想使用这一法典:
List<U> SelectAll<T>() where T : class;
问题在于,我想通过T型和U型,但C#有关键词,但没有U关键词。 • 如何通过T型,在Interface declration>中找到另一种类型;
感谢
Sorry I post Answer here but I want show you code: I m writing this code:
interface IRepoitory<T> where T : class
{
T CreateInstance();
IEnumerable<U> SelectAll();
what can I write instead of "U"? when I Impelement interface and I have this code:
IEnumerable<TResult> SelectAll<TResult>();
In Class that implement the interface I cant Return Any class instead of TResult 感谢