I try to convert a VDF.IEntity containing a File to a legacy File object. As documented in the wiki help only a simple cast is needed.
I tried the following:
VDF.Vault.Currency.Entities.IEntity ent = ...
Autodesk.Connectivity.WebServices.File file = (Autodesk.Connectivity.WebServices.File)ent;
Doing so I'm getting an InvalidCastException, what is wrong?
Solved! Go to Solution.
Solved by KarlR.J.Wehr. Go to Solution.
just found out the solution, I have to cast this way:
Autodesk.Connectivity.WebServices.File file=
(Autodesk.Connectivity.WebServices.File)(VDF.Vault.Currency.Entities.FileIteration)ent;
how to convert
File to IEntity.