using System.Collections.Generic;
public string DatabaseServer { get; set; } = "ParentServer";
public class Child : Parent
public Child() { DatabaseServer = "Child"; }
public static void Main()
Parent parent = new Parent();
Console.WriteLine(parent.DatabaseServer);
Child child = new Child() { DatabaseServer = "Child Other" };
Console.WriteLine(child.DatabaseServer);
Parent childAsParent = new Child();
Console.WriteLine(childAsParent.DatabaseServer);
List<Parent> collection = new();
collection.Add(childAsParent);
collection.Add(new Parent());
collection.Add(new Child());
collection.Add(new Child() {DatabaseServer = "Another"});
foreach(Parent p in collection)
Console.WriteLine(p.DatabaseServer);