Runtime Error: Object reference not set to an instance of an object
Author: wycan
Creation Date: 8/26/2008 10:14 AM
profile picture


I created the two simple examples below to understand how WL works when creating seperate namespaces and calling one class from another. I'm using Visual Express C# to create the second DLL (MyToolBox.dll). It compiles and builds fine. I copy the DLL over to the WL 5.0 directory (after shutting and restarting WL 5.0) and ensure a reference is setup for it. The "CMechanic" file also compiles fine. When I run it, I get the following error;

"Runtime Error: Object reference not set to an instance of an object.
at Wealthlab.Strategies.CMechanic.Execute()
at MyToolBox.CToolBox.sayHello()
at WealthLab.WealthScript.PrintDebug(String message)

Any ideas why I would be getting that error above ? thx

Here is the code for MyToolBox

Please log in to see this code.

Here is the Code for CMechanic;
Please log in to see this code.

profile picture


Would you agree with me that simply continuing HERE would not break the continuity of discussion?

Anyway, a reply to the thread above from 7/16/2008 11:49 AM already contains both this answer and a code sample. Use the same approach in your C# project: don't implement but pass the WealthScript object by reference.
profile picture



Yes... it's the same discussion. I'll try that. thx
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).