{ "attributes":{ "AnimalType":"Lion", "Name":"lio", "Eats":"Meat" } }
{ "attributes":{ "AnimalType":"Chicken", "Name":"Henry", "HasFeathers":true } }
<pre lang="c#">public abstract class Animal { public virtual string AnimalType{ get; set; } } public class Lion : Animal { public override string AnimalType{ get; set; } public string Eats { get; set; } public string Name{ get; set; } } public class Chicken : Animal { public override string AnimalType{ get; set; } public bool HasFeathers { get; set; } public string Name{ get; set; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)