c# Assisgment
c# Assisgment
using System.Threading;
namespace program
{
class Program
{
static void Work(string name, int delay)
{
Console.WriteLine($"[Thread] {name} (ID:
{Thread.CurrentThread.ManagedThreadId}) starts.");
Thread.Sleep(delay);
Console.WriteLine($"[Thread] {name} (ID:
{Thread.CurrentThread.ManagedThreadId}) finishes.");
}
static void Main()
{
Console.WriteLine("[Thread] Main: " +
Thread.CurrentThread.ManagedThreadId);
thread1.Start();
thread2.Start();
thread1.Join();
thread2.Join();
Console.WriteLine("[Thread] Done.");
t1.Players.Add(p1);
t1.Players.Add(p2);
t2.Players.Add(p3);
t2.Players.Add(p4);
club.DisplayClubInfo();
public Player(int playerId, string name, int age, Position position, int
rating) : base(name, age)
{
PlayerId = playerId;
Position = position;
Rating = rating;
}
public Coach(int coachId, string name, int age, string specialty, int
experienceScore) : base(name, age)
{
CoachId = coachId;
Specialty = specialty;
ExperienceScore = experienceScore;
}