The following complies but at run time throws an exception. What I am trying to do is to cast a class PersonWithAge to a class of Person. How do I do this and what is the wo
you might want to modify your code to be something like:
class Person { public int Id { get; set; } public string Name { get; set; } } class PersonWithAge : Person { public int Age { get; set; } }