using VB.NET created class in C# program

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a class "clsABC" which is created by VB.NET. I am trying use it in the
C# program. Although I can add it in the project reference, I can't browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.
 
Are you sure clsABC is also the name of the namespace in which the class is
defined. The VS editor is getting confused because of the using statement.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
 
Stanley said:
I have a class "clsABC" which is created by VB.NET. I am trying use it in
the
C# program. Although I can add it in the project reference, I can't browse
the methods and properties in the coding.
Please see the following coding:

using clsABC
clsABC tmpClass = new clsABC();
tmpClass. <------ I can see any methods and properties.

Are its methods public?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
Hi,


Why don't you use the Object Browser.

Are you sure you have a class named clsABC and not a module?

cheers,
 
You can't apply "using" to a class in C# (although you can in VB).
Also, VB projects have a default namespace under which everything in the
project exists - it's not part of your code files, but a project property
(the root namespace concept is different in VB than in C#).

--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
 
I have click the object in the reference folder of the project and find the
namespace is clsABC.
 
Do you mean that I have to build a release of the VB class in advance and
then add this released class into my C# project? Is this can solve my
problem?
 
Hi,

Crtl+Alt + J

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
 
Back
Top