私が行った場合:
IList<WSACLI_ComunicazionePersonale> Comunicazioni = (from XmlNode n in m_oNode.SelectNodes("m_Detail_Row")
select new WSACLI_ComunicazionePersonale(n)).ToList();
それは完璧に機能し、WSACLI_ComunicazionePersonale
オブジェクトのリストを作成します!
しかし、もしそうなら:
IList<WSACLI_ComunicazionePersonale> Comunicazioni = m_oNode.SelectNodes("m_Detail_Row").Cast<WSACLI_ComunicazionePersonale>().ToList();
リストはnull
です。コンストラクターを呼び出してCast()
いないようですか?