Error: Unable to cast object of type 'X.Y.C.1' to 'X.Y.C.2'.
1 view (last 30 days)
Show older comments
Hello,
I three classes A, B and C where, B is derived from A and C is derived from both A & B. I created an object of class C (Obj) and initialized it correctly by calling constructors of A and B.
Class A and B have some functions (static) which access other functions which are a part of some .NET assemblies installed on my computer.
When I try to use this object Obj to access the static functions of A and B (which have calls to functions that reside in the .NET assemblies) I am receiving this above error.
Can someone kindly help me understand what might be going wrong?.
Also can anyone kindly let me know where I can find the function definitions that exist in the .NET assemblies on my computer? I have little experience in this regard and help will be greatly appreciated.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!