COM and C#.NET

dragan

New member
Joined
Jun 4, 2003
Messages
1
Location
Ljubljana
am trying to use a COM object from "Bussines Aplication- Scala" in a C# program. I have added
the control to the project as a reference. If I
understand things correctly, this takes care of the
compatibilty issues between .net and COM. Here is the
code:


....
SfwIII.CommonVariablesClass test;
test = new SfwIII.CommonVariablesClass();

I get a error which
say "SfwIII.CommonVariablesClass.CommonVariablesClass() is inaccessible due
to its protection level".

When I browse the object the class is defined as public and all members too.

What am I missing? Any help would be appreciated.

Thanks

Dragan
 
It depends when you get the error.. but if you have added it to the form, it adds it with a protected modifier. Check where it is defined within the code.

for example

Code:
protected System.Web.UI.WebControls.TextBox HiddenProductCode;

dependent on how you try and call the method you may get that message but would have to see your code
 
Back
Top