0
使用LINQ Select
方法的重載之一,我可以構建一種新型的與該項目的索引的屬性之一:產出指數
var lst = new List<int>() {1,1,2,3,5};
var selected = lst.Select((x,index) => new {
number = x,
index
});
是否有可能也將當前索引作爲輸出對象的屬性之一使用Select-Object
?
# $selected.Visual is a WPF Grid
$selected.Visual.ColumnDefinitions | Select-Object -Property Width, MinWidth, MaxWidth, ActualWidth