Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Validator;
  7. namespace hetfo_gyakorlas
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14.  
  15.  
  16. foreach (var item in Loader2())
  17. {
  18. Console.WriteLine($"{item.Szolgaltato} {item.Netsebesseg}");
  19. }
  20. Console.ReadLine();
  21.  
  22.  
  23.  
  24. }
  25. static List<Person> Loader()
  26. {
  27. List<Person> people = new List<Person>();
  28. int counter = -2;
  29. for (int i = 0; i < 10; i++)
  30. {
  31. Person person = new Person($"Pista{i}", counter);
  32. if (ValidatorClass.Validation(person))
  33. {
  34. people.Add(person);
  35. }
  36. counter++;
  37.  
  38.  
  39. }
  40. return people;
  41. }
  42. static List<Internet> Loader2()
  43. {
  44. List<Internet> people = new List<Internet>();
  45. int counter = -2;
  46. for (int i = 0; i < 10; i++)
  47. {
  48. Internet person = new Internet($"Digi{i}", counter);
  49. if (ValidatorClass.Validation(person))
  50. {
  51. people.Add(person);
  52. }
  53. counter++;
  54.  
  55.  
  56. }
  57. return people;
  58. }
  59.  
  60.  
  61.  
  62.  
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement