cs11dotnet7/vscode/Chapter09/WorkingWithSerialization/Person.cs
2022-03-04 08:34:29 +00:00

27 lines
497 B
C#

using System.Xml.Serialization; // [XmlAttribute]
namespace Packt.Shared;
public class Person
{
public Person() { }
public Person(decimal initialSalary)
{
Salary = initialSalary;
}
[XmlAttribute("fname")]
public string? FirstName { get; set; }
[XmlAttribute("lname")]
public string? LastName { get; set; }
[XmlAttribute("dob")]
public DateTime DateOfBirth { get; set; }
public HashSet<Person>? Children { get; set; }
protected decimal Salary { get; set; }
}