我的wcf服务中有实体类,方法将返回List<MainClass>
。
在Silverlight应用程序中消耗服务时,e.Result需要访问ForthClass。如何施展e.result?
public class MainClass
{
public List<SecondClass> SecondClassList { get; set; }
}
public class SecondClass
{
public List<ThirdClass> ThirdClassList { get; set; }
}
public class ThirdClass
{
public string Name { get; set; }
}
UI服务电话:
ServiceClient.getNameCompleted += (s, e) =>
{
ObservableCollection<ThirdClass> test = ((ThirdClass)e.Result[0].SecondClassList).ThirdClassList ;
};