Calling C# method from VB and passing object by reference

  • Thread starter Thread starter robertm
  • Start date Start date
R

robertm

I have the following method written in C#
public static void Substitute(ControlCollection controls, ArrayList
affectedControls, ref CCase objCase)

{
// ..................
}



From VB.NET I call it like this

myclass.Substitute(controls, affectedControls, m_objCase)


Definition of CCase is in another VB project and I have refrences to it in
C# project and the calling VB project.

However, whenever I am doing a build the calling VB project generates the
following error.

E:\Development\Vega\VegaGUICommon\cControlSetupWeb.vb(51): Reference
required to assembly 'VegaObjects' containing the type 'VegaObjects.CCase'.
Add one to your project.


What is wrong?
 
I think it is a MS bug. Surprised it still exists in VS 2003 as I found
reference to it
in Jan 2002!!!!

The problem disappears, if I browse for DLL containing CCase, instead of
referencing
its source project.
 
Back
Top