"not anymore, since it can contain only one argument."
A list holds an object. That object can be a class with many properties or a collection that holds many objects or a class with properties that are collections and have one class object with many collections in it. Why do you need multiple arguments?
"each flag object would have a string Name and an int BarNb. (from the concat of both lists<int>."
The Flag class having a string and int property is fine. from the concat of both lists? Why do you have two lists? What are these lists for? Why are they being concatenated instead of being one list?
Do you have two distinct lists with different data, and you want to line up the indexes? Like use the index of the element in listA as the same index for listB?
"does the query from the strategy not help figuring out what I attempt to do ?
foreach (CustomClass.Flag thisObject in MyExampleList.Where(obj => obj.Name.Contains("flagListA") || obj.BarNb > someInt))"
This appears to be attempting to select a CustomClass.Flag which is not making sense. Do you want a CustomClass object returned or a Flag object returned?
If you return a CustomClass, that CustomClass would have a .Flag you can use.
But the where of selecting CustomClass where the name string is 'flagListA' or the BarNb is someInt would work.
CustomClass<MyFlagList<Flag>> would not be correct.
CustomClass is not an enumerable type collection and doesn't hold another type. List, like an array, is an enumerable collection class. I'm not sure what MyFlagList is, but I don't this is a type at all and you are intending to use this as a variable name. But if that was a custom class itself, it also is not enumerable.
A List<T>, an array T[], a Dictionary<TKey, TValue>, a KeyValuePair<TKey, TValue>, are all enumerable type collections.
Comment