Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public class Cliente
  2. {
  3. public string ID { get; set; }
  4. public string Nome { get; set; }
  5. public string CPF { get; set; }
  6. public string Email { get; set; }
  7. public string Base { get; set; }
  8. public bool Enviado { get; set; }
  9.  
  10. public Cliente(string id, string nome, string cpf, string email, string baseDados = "TV", bool enviado = false)
  11. {
  12. ID = id;
  13. Nome = nome;
  14. CPF = cpf;
  15. Email = email;
  16. Enviado = enviado;
  17. Base = baseDados;
  18. }
  19. }
  20.  
  21. List<Cliente> clientes = new List<Cliente>();
  22.  
  23. Cliente c = clientes.Select(x => x.Enviado == false);
  24.  
  25. Cliente c = clientes.FirstOrDefault(x => !x.Enviado);
  26.  
  27. Cliente c = clientes.Where(x => x.Enviado == false).FirstOrDefault();
Add Comment
Please, Sign In to add comment