Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. [Serializable]
  2. public class Person
  3. {
  4. public string name { get; set; }
  5. public string surename { get; set; }
  6. public string birthday { get; set; }
  7. public string sex { get; set; }
  8. public string country { get; set; }
  9. public string city { get; set; }
  10. public int growth { get; set; }
  11. public int weight { get; set; }
  12. public string hair_color { get; set; }
  13. public string eye_color { get; set; }
  14. public string zodiac_sign { get; set; }
  15.  
  16. public Person()
  17. {
  18. name = null;
  19. surename = null;
  20. birthday = null;
  21. sex = null;
  22. country = null;
  23. city = null;
  24. growth = 0;
  25. weight = 0;
  26. hair_color = null;
  27. eye_color = null;
  28. zodiac_sign = null;
  29. }
  30. }
  31.  
  32. private void btSave_Click(object sender, EventArgs e)
  33. {
  34. Person[] persons = new Person[dataGridView1.RowCount];
  35. for(int i = 0; i < dataGridView1.RowCount; i++)
  36. {
  37. persons[i] = new Person();
  38. //Дальше загвоздка...
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement