Not sure how optimized this is, but should suit your needs - Assuming I understood what you wanted:
var enumerable1 = new[]
{
new {Id = "A", Value = 1.0},
new {Id = "B", Value = 2.0},
new {Id = "C", Value = 3.0},
new {Id = "D", Value = 4.0},
new {Id = "E", Value = 5.0},
};
var enumerable2 = new[]
{
new {Id = "A", Value = 6.0},
new {Id = "NOT PRESENT", Value = 542.23},
new {Id = "C", Value = 7.0},
new {Id = "D", Value = 8.0},
new {Id = "E", Value = 9.0},
};
var result = enumerable1.Join(enumerable2, arg => arg.Id, arg => arg.Id,
(first, second) => new {Id = first.Id, Value1 = first.Value, Value2 = second.Value});
foreach (var item in result)
Console.WriteLine("{0}: {1} - {2}", item.Id, item.Value1, item.Value2);
Console.ReadLine();
The resulting output would be something akin to:
A: 1 - 6
C: 3 - 7
D: 4 - 8
E: 5 - 9
Don't really see why you would want null values returned, unless you absolutely need to (Besides, double is not-nullable, so it would have to be the resulting combined entry that would be null instead).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…