System.TypeLoadException when using a vector as argument in a method
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!
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.
精彩评论