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. 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.
"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
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.
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.
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.
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
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.
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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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)...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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:...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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,...
| |