Say I have the following class:
public class ConfigItemType
{
public string Name { get; set; }
public double SomeOtherThing { get; set; }
}
and then I make a list of the following classes (List<ConfigItemType> MyList
)
Now I have a method with the following signature:
void AggregateValues(string someUnrelatedValue, params string[] listGoesHere)
How can I fit MyList
in to the listGoesHere
using the value in ConfigItemType.Name
as the params string array?
I am fairly sure that Linq can do this.... but MyList
does not have a select
method on it (which is what I would have used).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…