名单的最大名单上有以下两类:返回实体框架C#
public class Result
{
public string plate { get; set; }
public double confidence { get; set; }
public int matches_template { get; set; }
public int plate_index { get; set; }
public string region { get; set; }
public int region_confidence { get; set; }
public long processing_time_ms { get; set; }
public int requested_topn { get; set; }
public List<Coordinate> coordinates { get; set; }
public List<Candidate> candidates { get; set; }
}
public class Candidate
{
public string plate { get; set; }
public double confidence { get; set; }
public int matches_template { get; set; }
}
我有这个疑问:
List<List<Candidate>> lstCandidates =
deserializedProduct.results.Select(i=>i.candidates).ToList();
正如你可以看到我有list<Candidate>
列表。每个候选人都有plate
和confidence
。我需要最大的信心在我的lstCandidates
板数。如何获得这个值?
你尝试过什么吗?我会很乐意提供帮助,但是您必须展示您所尝试的内容,以便我们帮助您纠正它。你是否正在寻找max'confidence'值,或者你在寻找具有最大'confidence'值的'Candidate'项目。 –
@GiladGreen你知道我想使用foreach解决方案,传统的解决方案。但还没有编码。我想知道也许有更好的解决方案 –
@GiladGreen我需要最大信心的板数 –