Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Работа_с_классами
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player("Alex", 2700, 18);
- player.ShowInfo();
- }
- }
- class Player
- {
- string _name;
- private int _mmr;
- private int _age;
- public Player(string name, int mmr, int age)
- {
- _age = age;
- _name = name;
- _mmr = mmr;
- }
- public void ShowInfo()
- {
- Console.WriteLine($"Имя: {_name} | mmr: {_mmr} | возраст: {_age}") ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement