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 3116
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*****@discus sions.microsoft .com> wrote in message
news:04******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:04******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:04******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message news:04******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message news:04******** *************** ***********@mic rosoft.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?t hanks!
"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*****@discus sions.microsoft .com> wrote in message news:04******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:31******** *************** ***********@mic rosoft.com... yes all the methods are Public.
"Richard Blewett [DevelopMentor]" wrote:
"Stanley" <St*****@discus sions.microsoft .com> wrote in message news:04******** *************** ***********@mic rosoft.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) the dll
using the generated typelib. In Access, when I run the Access
application and declare a new instance of the class as follows
Dim MyTest As clsTestLib.Class1
Set MyTest = New clsTestLib.Class1
I get an error Run-time message that says...
|
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
Run-time error. When I run it on an XP machine it crashes, but on an
NT box it just generates an unknown error, handled by the error
handler. I have debugged and stepped through the code and have
narrowed the issue to the point at which the...
|
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 where the job is
running, the job runs sucessfully, PDF files got generated, everything
is good. If I scheduled the job to run at the time that I am not
logged into the server, Access is not able to print to the printer.
The error is pretty...
|
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 into the bin directory but am not able to progress. Can anyone
please guide me to an online tutorial on the subject.
Thanks,
|
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 constructors (because we do not
allow developers to instantiate them directly).
Because our business objects are instantiated very frequently, the idea of
using reflection sounds like a performance killer (I haven't done any tests
on this, but the...
| |
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 very unhappy with the idea and
the compiler refuses to play ball with any of the attempts I have made to
build such a structure. There is no problem when using a single string but a
two dimensional array of strings appears to be a very different...
|
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: Can
some body please help? There a total of three simple files whose contents,
which I have copied here.
|
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 not ever instantiated (thus no constructor or
destructor ever called), but instead, all of its member variables are
defined as static in the according .cpp file, and it's methods are
invoked by calling foo::bar(...) to invoke method "bar(...)".
|
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 is that it's
not destroyed, but I'm not sure.
I have the following program:
#include<iostream>
|
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 Python is passing cls invisibly to
__new__). Does anyone have an idea what is going on here?
I have not defined __new__ in MyClass above. I can make the problem go away
on one platform by defining __new__ as
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |