Finding the difference between postal addresses I have to compose an email where I have to list a list of difference between old and new value of a list of addresses. Only a subset of properties have to be listed, so the first thing that pops into my mind is doing something like this:

private static List&lt;Difference&gt; RetrieveDifferences(IEnumerable&lt;AddressPoco&gt; newValues, AddressPoco item){
  var result = new List&lt;Difference&gt;();
  var c = newValues.SingleOrDefault(x =&gt; x.xedsAddressID == item.xedsAddressID);
  if (c != null)
  {
    if (item.xgeoCountryID != c.xgeoCountryID){
       result.Add(new Difference("Country", item.xgeoCountryID.ToString(), c.xgeoCountryID.ToString()));
    }
    if (item.AddressTypeName != c.AddressTypeName){
       result.Add(new Difference("Address Type", item.AddressTypeName, c.AddressTypeName));
    }
    if (item.City != c.City){
       result.Add(new Difference("City", item.City, c.City));
    }
    if (item.POBox != c.POBox){
       result.Add(new Difference("POBox", item.POBox, c.POBox));
    }
    if (item.MainContact != c.MainContact){
       result.Add(new Difference("Main Contact", item.MainContact, c.MainContact));
    }
    if (item.PostCode != c.PostCode){
       result.Add(new Difference("PostCode", item.PostCode, c.PostCode));
    }
    if (item.Street != c.Street){
       result.Add(new Difference("Street", item.Street, c.Street));
    }
 }
 return result;
}

public class Difference {
  public string Key { get; set; }
  public string OldValue { get; set; }
  public string NewValue { get; set; }
  public Difference(string key, string oldValue, string newValue)
  {
    Key = key; OldValue = oldValue; NewValue = newValue;
  }
}


However, Visual Studio shows me a low maintainability index of 50 and high cyclomatic complexity in 18 rows.  I can understand why.  Any suggestion for how to improve it?
The characteristic numbers are not always indicating bad code...

However, you could do something like that to improve the numbers:

private static List&lt;Difference&gt; RetrieveDifferences(IEnumerable&lt;AddressPoco&gt; newValues, AddressPoco item)
{
    var c = newValues.SingleOrDefault(x =&gt; x.xedsAddressID == item.xedsAddressID);
    if (c != null)
        return GetDifferences(c, item).ToList();

    return Enumerable.Empty&lt;Difference&gt;().ToList();
}

private static IEnumerable&lt;Difference&gt; GetDifferences(AddressPoco newAdress, AdressPoco oldAddress)
{
    if (item.xgeoCountryID != c.xgeoCountryID)
        yield return new Difference("Country", item.xgeoCountryID.ToString(), c.xgeoCountryID.ToString()));
    if (item.AddressTypeName != c.AddressTypeName)
        yield return new Difference("Address Type", item.AddressTypeName, c.AddressTypeName));
    if (item.City != c.City)
        yield return result.Add(new Difference("City", item.City, c.City));
    if (item.POBox != c.POBox)
        yield return result.Add(new Difference("POBox", item.POBox, c.POBox));
    if (item.MainContact != c.MainContact)
        yield return result.Add(new Difference("Main Contact", item.MainContact, c.MainContact));
    if (item.PostCode != c.PostCode)
        yield return result.Add(new Difference("PostCode", item.PostCode, c.PostCode));
    if (item.Street != c.Street)
        yield return result.Add(new Difference("Street", item.Street, c.Street));
}