0
我需要填寫一個集合在C另一個列表++/CLI所以這個問題,當我嘗試這樣做,我得到一個錯誤不能自ICollection轉換爲ICollection的C/CLI
錯誤C2664:「是SpaceClaim :: Api :: V10 :: InteractionContext :: Selection :: set':無法將參數1從'System :: Collections :: Generic :: ICollection ^'轉換爲'System :: Collections :: Generic :: ICollection ^'
和這裏的代碼
List<DesignEdge^> ^newEdges = gcnew List<DesignEdge^>();
for each (DesignEdge^edge in onecopiedBody->Edges)
{
if (!edges->Contains(edge))
{
newEdges->Add(edge);
}
}
cstom->InteractionContext->Selection = safe_cast<ICollection<IDesignEdge^> ^>(newEdges); //error here