我已經研究過了,雖然這是一個非常簡單的問題,但我不確定如何解決它。 我的代碼看起來是這樣的: public class Playlist {
public Playlist(String name) {
}
}
當然,單獨的文件: @Test
public void CreatePlaylist(){
Playlist myPlaylist = new P
是否可以訂購System.Collection.IList而不將其轉換爲已知類型? 我收到一個列表,object和使用 var listType = typeof(List<>);
var cListType = listType.MakeGenericType(source.GetType());
var p = (IList)Activator.CreateInstance(cListTy