在Linq中返回单个列表属性List

bha*_*rat 4 linq

我在这里有一个问题,我有一个清单

this.Ddown有3个属性

我想写一个Linq查询返回其中一个属性让我说我有属性a,b,c

我想要重新列表(c)

我如何在linq中做到这一点

Mat*_*ias 9

var listOfC = this.Ddown.Select(x => x.c).ToList();
Run Code Online (Sandbox Code Playgroud)


jsm*_*ith 8

var cList = (from record in this.Ddown
             select record.c).ToList();
Run Code Online (Sandbox Code Playgroud)