我有这个问题,当我尝试投射“批处理”对象时,我提出了异常“无效投射”。你能帮我解释一下为什么吗?Vault5 对象存在并且是正确的。
public void batch(IEdmVault5 vault5)
{
edmVault11 = (IEdmVault11)vault5;
IEdmBatchRefVars batch = default(IEdmBatchRefVars);
batch = (IEdmBatchRefVars)edmVault11.CreateUtility(EdmUtility.EdmUtil_BatchRefVars);
//some code
}
编辑1:错误消息:
System.InvalidCastException HResult=0x80004002 Messaggio=Cast specato non valido