You should just check the ContactPerson type.
if (company.ContactPerson is Employee) Console.WriteLine("I'm an Employee"); else Console.WriteLine("I'm a Person");
So, if the Employee class had an additional BadgeNumber property. You can access this property by casting Person in Employee.
if (company.ContactPerson is Employee) Console.Writeline("My badge Number is ", ((Employee)company.ContactPerson).BadgeNumber);
source share