在以下代码片段中,company.ParentID 是一个int?类型,parent是一个引用类型。但是这段代码语法错误。有没有办法修复这个内联条件?
company.ParentID = (parent == null ? null: (parent.ID));