Guest User

Untitled

a guest
May 26th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Class_A
  2. int id
  3. int price
  4. string definition
  5.  
  6. Class_A car = new Class_A()
  7. {
  8. id = 1,
  9. price = 100000,
  10. definition = "Chevrolet 100 has 3000cc, using 250Cv. The 55/95 tires are
  11. included in the price. Just for 2 PAX... etc ..."
  12. }
  13.  
  14. List<string> checkingList = new List<string>();
  15. checkingList.Add("3000cc");
  16. checkingList.Add("250Cv");
  17. checkingList.Add("55/95 tires");
  18.  
  19. bool sucess;
  20. sucess = car.Select(p => p.definition.Contains(checkingList)).FirstorDefault();
  21. sucess = car.Select(p => p.Where(o => o.definition.Contains(checkingList)).FirstorDefault();
  22. sucess = car.Select(p => p.Where(o => o.definition.ForEach.Contains(checkingList)).FirstorDefault();
Add Comment
Please, Sign In to add comment