Last active
January 22, 2026 02:34
-
-
Save VladimirYus/e528b0892233ce70ab8fb6bde83b55ec to your computer and use it in GitHub Desktop.
WorkClasses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace WorkClasses | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Player player = new Player(1, "Владимир", "Любит играть в RPG"); | |
| player.ShowInfo(); | |
| } | |
| } | |
| class Player | |
| { | |
| private int _id; | |
| private string _name; | |
| private string _description; | |
| public Player(int id, string name, string description) | |
| { | |
| _id = id; | |
| _name = name; | |
| _description = description; | |
| } | |
| public void ShowInfo() | |
| { | |
| Console.WriteLine($"ID игрока: {_id}\nИмя игрока: {_name}\nОписание: {_description}"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment