Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Task38
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player("John",21);
- player.ShowInfoPlayer();
- }
- }
- class Player
- {
- private string _name;
- private int _age;
- public Player(string name, int age)
- {
- _name = name;
- _age = age;
- }
- public void ShowInfoPlayer()
- {
- Console.WriteLine($"Имя игрока - {_name}, его возраст - {_age}");
- }
- }
- }
Add Comment
Please, Sign In to add comment