views:

14

answers:

1

Hi,

I have a class Param.cpp which is a set of parameters for the main class Model.cpp. I create an instance of Param.cpp in a C# file using a graphic interface. It works great, I can see in debug that the param has a PropList containing one element - in my example.

My Model class has a function BuildModel(Param param) which set the model parameters.

When I call this method in the C# file, at this very moment, the PropList disappears, and I got System.TypeLoadException on all its parameters when I open the PropList tree in locals parameters.

Nothing is being done except calling it in a method.

I hope someone understand this, that would be great!

A: 

Look at the exception's InnerException property. That tells you what really went wrong. If that doesn't help, update your question with its message and stacktrace.

Hans Passant