I have 2 classes and declare as below:
public class One { public string Id { get; set; } }
public class Two : One { public string Name { get; set; } }
var s1 = new List<One>() { new One() {Id = '1'}, new One() {Id = '2'}};
var s2 : List<Two>();
How to assign s1 to s2 in net core so that s2 will have Id value?
New contributor
Ngoan Nguyen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.