list-template

C# List<T> adding inherited items [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-12 04:12:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Let's say that we have 2 classes. The first one is Person using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace People { class Person { public string FirstName { get; set; } public string LastName { get; set;