如何引用列表中的值?

时间:2017-11-10 09:46:05

标签: c# xamarin

如何参考SearchResponseModel =>列表中的值? SearchResultModel?

    public class SearchResponseModel
    {
        public class SearchResultModel
        {
            [JsonProperty("uin")]
            public Int64 Uin { get; set; }

            [JsonProperty("login")]
            public string Login { get; set; }

            [JsonProperty("registration_number")]
            public List<string> RegistrationNumberList { get; set; }

            [JsonProperty("type_search")]
            public int TypeSearch { get; set; }
        }
.....
        [JsonProperty("search_result")]
        public List<SearchResultModel> SearchResult { get; set; }
    }

在SearchModel中,我需要获取Uin和Login

public class SearchModel
    {
        public SearchModel(SearchResponseModel model)
        {
            Uin = model.SearchResult. ???????
        }

        public Int64 Uin { get; set; }

        public string Login { get; set; }
    }

0 个答案:

没有答案