I want to pass a BusinessObject by reference into a method, as I want the BO changed in the method, and the resultant chnged BO available in the calling routine. I have set up a very simple method for illustration purposes(does not do anything)
TestMethod(ref KernelBaseSF.KernelBO myBO)
{ int x; x=1}
(KernelBaseSF.KernelBO is my Subclass of the
MicroFour.StrataFrame.Business.BusinessLayer)
Now, the following does NOT give a compile error:
KernelBaseSF.KernelBO bo = new KernelBaseSF.KernelBO();
KEK001.TestMethod(ref bo);
However, if I try to use a BO thats dropped on the form as in:
KEK001.TestMethod(ref this.KmaBO1)
I get an Error 6 The best overloaded method match for 'KEKCommon.KEK001.TestMethod(ref KernelBaseSF.KernelBO)' has some invalid arguments C:\KEK\Kernel_App\Scp_Maint.cs 242 13 Kernel_App
If I just take out the ref parameter in the calling and called methods,it compiles ok, so it looks like there is an issue, for calling by ref, of a BO dropped on the form