123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using static WpfAppA.model.Globals;
- using System.Threading.Tasks;
- using System.Runtime.Serialization;
- namespace WpfAppA.model
- {
- [DataContract]
- public class Hero
- {
- [DataMember]
- public string name { get; set; }
- [DataMember]
- public int Age { get; set; }
- [DataMember]
- public string power { get; set; }
- [DataMember]
- public string race { get; set; }
- [DataMember(Name = "dateOfLastVaccination")]
- private string? stringDate { get; set; }
- [IgnoreDataMember]
- public DateTime? dateOfLastVaccination
- {
- get
- {
- return stringDate == null ? null : DateTime.Parse(stringDate);
- }
- set
- {
- stringDate = value.ToString();
- }
- }
- }
- }
|