mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 06:15:24 +00:00
Initial commit
This commit is contained in:
parent
17ad36d6ad
commit
3d241b2154
44 changed files with 1619 additions and 0 deletions
26
vs4win/Chapter09/WorkingWithSerialization/Person.cs
Normal file
26
vs4win/Chapter09/WorkingWithSerialization/Person.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue