Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var product = new List<ProductCrp>
- {
- new ProductCrp {
- Strucutre = new StructureItem() {
- CheckList = new CheckList() {
- Checks = new List<Check>
- {
- new Check { NumberAsInt = "149" },
- new Check { NumberAsInt = "260" },
- new Check { NumberAsInt = null }
- }
- }
- }
- },
- new ProductCrp {
- Strucutre = new StructureItem() {
- CheckList = new CheckList() {
- Checks = new List<Check>
- {
- new Check { NumberAsInt = "261" },
- new Check { NumberAsInt = "150" },
- new Check { NumberAsInt = "260" }
- }
- }
- }
- }
- };
- string[] numbers = { "149" };
- foreach (var item in product)
- {
- item.Strucutre.CheckList.Checks = item.Strucutre.CheckList.Checks.Where(w => numbers.Contains(w.NumberAsInt)).Select(w => w);
- }
Add Comment
Please, Sign In to add comment