为什么
var value = new Guid[]{};
var b = (object[])value;
结果是
Cannot cast 'value' (which has an actual type of 'System.Guid[]') to 'object[]'
?
更新
对不起,不准确。真正的代码是:
private void SetEditors(object value)
{
var array = value as object[];
...
}
如果值为 Guid 数组,则数组为空。