考虑一下下面的接口...
public interface ILibraryService<T>
where T : Library
{
ReadOnlyObservableCollection<T> AvailableLibraries { get; }
}我想定义一个静态属性,它可以包含实现此接口的任何对象,就像下面的伪代码...
public static class Services
{
public static ILibraryService<T> LibraryService { get; set; }
}...but我想不出如何定义这个属性。我知道这很简单,但我就是看不出来。
https://stackoverflow.com/questions/38194165
复制相似问题