We have the class ReinsurancePolicyPublic class ReinsurancePolicy{public int PolicyId{get; set;}public string Country{get; set;}public string Insured{get;set;}public string Broker {get; set;}public bool IsLeading { get; set;}}
Our data source is :var policies = new List()
{new ReinsurancePolicy{ PolicyId = 1, Broker = 'Broker A', Insured = 'InsuredA', Country = 'US', Isleading = false},new ReinsurancePolicy{ PolicyId = 2, Broker = 'Broker B', Insured = 'InsuredB', Country = 'US', Isleading = true },new ReinsurancePolicy{ PolicyId = 3, Broker = 'Broker C', Insured = 'InsuredC', Country = 'US', Isleading = true }};And we want to find our leading policy:
var leading = policies.where(x => x.IsLeading == true).SingleOrDefault();
What is the value off leading?