Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Player firstPlayer = new Player("Vladimir", 21, 101);
- firstPlayer.ShowInfo();
- }
- class Player
- {
- private string _name;
- private int _age;
- private int _id;
- public Player(string name, int age, int id)
- {
- _name = name;
- _age = age;
- _id = id;
- }
- public void ShowInfo()
- {
- Console.WriteLine($"Ваше имя: {_name}\nВаш возраст: {_age}\nВаш id: {_id}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement