我有一个类人,具有 id、name、salary 属性。
class person
friend id as long
friend name as string
friend salary as decimal
end class
我不想列出工资清单。
Dim pList as new list(of person)
pList 加载了 50 个条目
Dim SalaryList as new list(of decimal)
for each p as person in plist
SalaryList.add(p.salary)
next
好的,这行得通。但是有没有办法做到这一点:
Dim SalaryList as list(of decimal) = pList(each).salary