473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

using VB.NET created class in C# program

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.
Nov 17 '05 #1
9 3104
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" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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.

Nov 17 '05 #2
"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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
Nov 17 '05 #3
Hi,
Why don't you use the Object Browser.

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

cheers,

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

"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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.

Nov 17 '05 #4
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
"Stanley" wrote:
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.

Nov 17 '05 #5
I have click the object in the reference folder of the project and find the
namespace is clsABC.

"Atul" wrote:
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" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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.


Nov 17 '05 #6
yes all the methods are Public.

"Richard Blewett [DevelopMentor]" wrote:
"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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

Nov 17 '05 #7
would you tell me how to get the ObjectBrowser?thanks!

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Why don't you use the Object Browser.

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

cheers,

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

"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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.


Nov 17 '05 #8
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?
"David Anton" wrote:
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
"Stanley" wrote:
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.

Nov 17 '05 #9
Hi,

Crtl+Alt + J

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.com...
yes all the methods are Public.

"Richard Blewett [DevelopMentor]" wrote:
"Stanley" <St*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
>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

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RichGolebiowski | last post by:
I have a class library (clsTestLib) that was created in VB.Net that I would like to use in Access 2000. I created a typelib for the class using regasm.exe. I am able to refernce (add a reference)...
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
8
by: acb | last post by:
Hi, I wrote a DLL Component (using Visual Studio 2005) and managed to include it into a C# Console application. I am now trying to include this component into a Web project. I copy the DLL...
5
by: Anders Borum | last post by:
Hello! Whilst refactoring an application, I was looking at optimizing a ModelFactory with generics. Unfortunately, the business objects created by the ModelFactory doesn't provide public...
14
by: Peter Hallett | last post by:
I would like to set up a string array as a class member, or field, and then populate this array by reading in from a text file, but I cannot find the appropriate syntax. The getter and setter are...
4
by: Dinakara | last post by:
Hi, I am programming with C++ using the gcc compiler. Compiler : gcc version 3.4.3 OS : Red Hat 3.4.3-9.EL4. I am not able to run the following program that declares a Template:...
3
by: lars.uffmann | last post by:
Hi everyone! I am debugging a big piece of code on the search for memory leaks, using g++ under suse 9.3. Since I'm trying to eliminate ALL memory leaks, I now stumbled upon a class foo that is...
10
by: Jess | last post by:
Hello, If I create a temporary object using a dynamically created object's pointer, then when the temporary object is destroyed, will the dynamically created object be destroyed too? My guess...
7
by: Jeffrey Barish | last post by:
(Pdb) myclass MyClass( 0, 0, 'A string', 123.45) (Pdb) copy.copy(myclass) *** TypeError: TypeError('__new__() takes at least 4 arguments (2 given)',) I see 4 arguments (actually, 5 because...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.