// Assume 'selectManager' is a bool, 'manager' is a Manager (where Manager : User) and 'developer' is a Developer (where Developer : User) User u = selectManager ? manager : developer;