 
					不负相思意
					这应该可以解决问题:var result = structure.variants                     // Throw away variants without prices                    .Where(variant => variant.prices != null)                    // For each variant, select all needle prices (.toString) and flatten it into 1D array                    .SelectMany(variant => variant.prices.Select(price => price.needle.ToString()))                    // And choose only unique prices                    .Distinct();对于这样的结构:var structure = new Item(                new Variant(new Price(200), new Price(100), new Price(800)),                new Variant(new Price(100), new Price(800), new Price(12))            );是输出[ 200, 100, 800, 12 ]。它是如何工作的?.SelectMany基本上采用 array-inside-array 并将其转换为普通数组。[ [1, 2], [3, 4] ] => [ 1, 2, 3, 4 ],并.Distinct丢弃重复的值。我想出的代码几乎和你的一模一样。看起来你正在做.Distincton .Select,而不是 on .SelectMany。有什么不同?.Select选择一个值(在本例中) - 对它调用 Distinct 是没有意义的,这会删除重复项。.SelectMany选择许多值 - 所以如果你想在某个地方调用 Distinct,它应该在 的结果上SelectMany。