Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Collections.Generic;
- namespace ConsoleApp3
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Player user = new Player("Иван", "Трубодур", 100);
- user.PrintInfo();
- }
- }
- class Player
- {
- private string _playerName;
- private string _playerClass;
- private int _playerHealhf;
- public Player(string playerName, string playerClass, int playerHealhf)
- {
- _playerName = playerName;
- _playerClass = playerClass;
- _playerHealhf = playerHealhf;
- }
- public void PrintInfo()
- {
- Console.WriteLine($"Имя игрока: {_playerName}\nКласс игрока: {_playerClass}\nЖизни игрока: {_playerHealhf}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement