PIbd-33_Yunusov_N.N._COP/YunusovComponentsLibrary/Form1/TestPerson.cs

28 lines
531 B
C#
Raw Normal View History

namespace YunusovComponentsLibrary
{
public class TestPerson
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
2024-10-11 04:47:06 +04:00
public string Surname { get; set; } = string.Empty;
public int Age { get; set; }
public TestPerson()
{ }
2024-10-11 04:47:06 +04:00
public TestPerson(int Id, string Name, string Surname, int Age)
{
this.Id = Id;
this.Name = Name;
2024-10-11 04:47:06 +04:00
this.Surname = Surname;
this.Age = Age;
}
2024-10-11 04:47:06 +04:00
public string ToString()
{
2024-10-11 04:47:06 +04:00
return $"{Id}. {Name} {Surname} Возраст: {Age}";
}
}
}