Timeline for Creating a List of objects of a particular type only
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 24, 2018 at 11:24 | vote | accept | vin | ||
Apr 24, 2018 at 11:23 | answer | added | Denis | timeline score: 9 | |
Apr 24, 2018 at 11:21 | comment | added | Pieter Witvoet |
@BKSpurgeon: Linq also provides an OfType method: AllLoadCases.OfType<JointsLoadingPattern>().ToList() .
|
|
Apr 24, 2018 at 10:49 | comment | added | BenKoshy |
you could use linq: e.g. something like this: AllLoadCases.Where(case => case.GetType() == typeof(JointsLoadingPattern)).ToList() - i like the LINQ way because it is less verbose. but is exactly the same as what you are already doing right now.
|
|
Apr 24, 2018 at 10:23 | history | edited | t3chb0t | CC BY-SA 3.0 |
edited tags and title, reworded question because it was a feature-request; edited tags
|
Apr 24, 2018 at 10:22 | history | asked | vin | CC BY-SA 3.0 |