Sin descripción

vivanov 23909fb55a first commit hace 10 meses
.gitignore.txt 429e5ab52f first commit hace 11 meses
readme.md 23909fb55a first commit hace 10 meses

readme.md

Лабораторная работа №15

Основной код

using lab15_dll;
var p = new Player
{
    firstName = "Valery",
    lastName = "Ivanov",
    role = rol.Sniper,
    Categor = category.Player,
    Agee = Age.Eighteen,
};
Console.WriteLine($"Category: {p.Categor} | Name: {p.firstName} | LastName: {p.lastName} | Role: {p.role} | Age: {p.Agee}");

var s = new Staff
{
  firstName  = "Kris",
  lastName = "Kruyger",
  role = rol.Manager,
  Agee = Age.Twenty,
  Categor = category.Staff,
};

Console.WriteLine($"Category: {s.Categor} | Name: {s.firstName} | LastName: {s.lastName} | Role: {s.role} | Age: {s.Agee}");

Шаблон к коду (не знаю как еще назвать)

namespace lab15_dll;

public enum rol
{
    Sniper,
    Support,
    Lurker,
    EntryFragger,
    Manager,
    coach
};

public enum category
{
    Player,
    Devices,
    Role,
    Staff
};

public enum Age
{
    Fifteen = 15,
    Twenty = 20,
    Fourteen = 40,
    Eighteen = 18
};
public class Player
{
    public Age Agee;
    
    public category Categor;
    
    public rol role;
    public string firstName { get;set; }
    public string lastName { get;set; }
}

public class Staff
{
    public Age Agee;
    
    public rol role;
    
    public category Categor;
    
    public string firstName { get; set; }
    public string lastName { get; set; }
}

Вывод

Category: Player | Name: Valery | LastName: Ivanov | Role: Sniper | Age: Eighteen
Category: Staff | Name: Kris | LastName: Kruyger | Role: Manager | Age: Twenty