CodeGo.net>如何将列表转换为observablecollection
作者:互联网
大家好,我有一个Json类,如下所示:
private class RootObject
{
public string flag { get; set; }
public string message { get; set; }
public Result result { get; set; }
}
public class Result
{
public List<List<string>> professions { get; set; }
}
如何将结果类转换为可观察的集合?
解决方法:
ObservableCollection< T> have constructor,其采用IEnumerable< T>.
ObservableCollection<string> myCollection = new ObservableCollection<string>(Result);
标签:windows-phone-8,c 来源: https://codeday.me/bug/20191120/2041247.html