Skip to content

Instantly share code, notes, and snippets.

@VladimirYus
Last active January 22, 2026 02:34
Show Gist options
  • Select an option

  • Save VladimirYus/e528b0892233ce70ab8fb6bde83b55ec to your computer and use it in GitHub Desktop.

Select an option

Save VladimirYus/e528b0892233ce70ab8fb6bde83b55ec to your computer and use it in GitHub Desktop.
WorkClasses
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