14
C # 'da, List <string> nesnesi List <object> değişkeninde neden depolanamıyor?
Görünüşe göre bir List nesnesi C # 'da bir List değişkeninde saklanamaz ve hatta açıkça bu şekilde değiştirilemez. List<string> sl = new List<string>(); List<object> ol; ol = sl; sonuç türü örtük System.Collections.Generic.List<string>olarakSystem.Collections.Generic.List<object> Ve sonra... List<string> sl = new List<string>(); List<object> ol; ol = (List<object>)sl; Can sonuçları değil türünü dönüştürmek System.Collections.Generic.List<string>içinSystem.Collections.Generic.List<object> …