Advertisement
lekss361

Untitled

Oct 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2.  
  3. namespace HW5._1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. Player Newplayer = new Player("Aleks",30,"Муж");
  10. Newplayer.PlayerInfo();
  11. Console.ReadKey();
  12. }
  13. }
  14.  
  15. class Player
  16. {
  17. public int Age;
  18. public string NamePlayer;
  19. public string Gender;
  20.  
  21. public void PlayerInfo()
  22. {
  23. Console.WriteLine($"Ваше имя: {NamePlayer}\nВаш возраст: {Age}\nВаш пол: {Gender}");
  24. }
  25.  
  26. public Player(string namePlayer,int age,string gender)// 0-m 1-w
  27. {
  28. NamePlayer = namePlayer;
  29. Age = age;
  30. Gender = gender;
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement