I have a C# windows app and i need to use a VB.NET component to talk to
several servers.
Can i use the VB.NET component with my C# application?
thx 6 1146
Mike,
Yes, you can. VB.NET compiles to IL, just like C# does. This means
that if you develop an assembly in VB.NET, you can easily reference it in
C#. All you have to do is set a reference and you should be set.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message
news:O$*************@TK2MSFTNGP11.phx.gbl... I have a C# windows app and i need to use a VB.NET component to talk to several servers. Can i use the VB.NET component with my C# application?
thx
when i do that though i"m getting a namespace error, But I can reference
this same DLL in a VB.NET application
I have this in the begining of the code with all the other using
statements.
using LookAtTable.TableViewer;
and when i compile it i get
A using namespace directive can only be applied to namespaces
'LookAtTable.TableViewer' is a class not a namespace.
do i not use the USING statement with this like i use the import statement
in VB.NET?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eG**************@TK2MSFTNGP11.phx.gbl... Mike,
Yes, you can. VB.NET compiles to IL, just like C# does. This means that if you develop an assembly in VB.NET, you can easily reference it in C#. All you have to do is set a reference and you should be set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message news:O$*************@TK2MSFTNGP11.phx.gbl... I have a C# windows app and i need to use a VB.NET component to talk to several servers. Can i use the VB.NET component with my C# application?
thx
Mike,
TableViewer looks like a class. Just do:
using LookAtTable;
And it should work. You want to use the using statement for the
namespace that the classes are in, not the class itself (although you can
alias a class name, if you want).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message
news:er**************@tk2msftngp13.phx.gbl... when i do that though i"m getting a namespace error, But I can reference this same DLL in a VB.NET application I have this in the begining of the code with all the other using statements.
using LookAtTable.TableViewer;
and when i compile it i get
A using namespace directive can only be applied to namespaces 'LookAtTable.TableViewer' is a class not a namespace.
do i not use the USING statement with this like i use the import statement in VB.NET?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:eG**************@TK2MSFTNGP11.phx.gbl... Mike,
Yes, you can. VB.NET compiles to IL, just like C# does. This means that if you develop an assembly in VB.NET, you can easily reference it
in C#. All you have to do is set a reference and you should be set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message news:O$*************@TK2MSFTNGP11.phx.gbl... I have a C# windows app and i need to use a VB.NET component to talk
to several servers. Can i use the VB.NET component with my C# application?
thx
thanks that helped.
I'm in the process of learning C# and while converting a VB.NET app to C#
So i'll be asking alot of questions
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Ol*************@TK2MSFTNGP10.phx.gbl... Mike,
TableViewer looks like a class. Just do:
using LookAtTable;
And it should work. You want to use the using statement for the namespace that the classes are in, not the class itself (although you can alias a class name, if you want).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message news:er**************@tk2msftngp13.phx.gbl... when i do that though i"m getting a namespace error, But I can reference this same DLL in a VB.NET application I have this in the begining of the code with all the other using statements.
using LookAtTable.TableViewer;
and when i compile it i get
A using namespace directive can only be applied to namespaces 'LookAtTable.TableViewer' is a class not a namespace.
do i not use the USING statement with this like i use the import
statement in VB.NET?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:eG**************@TK2MSFTNGP11.phx.gbl... Mike,
Yes, you can. VB.NET compiles to IL, just like C# does. This
means that if you develop an assembly in VB.NET, you can easily reference it in C#. All you have to do is set a reference and you should be set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message news:O$*************@TK2MSFTNGP11.phx.gbl... > I have a C# windows app and i need to use a VB.NET component to talk to > several servers. > Can i use the VB.NET component with my C# application? > > thx > >
Namespaces can be tricky...
lets say you have two namespaces:
my.namespace.a;
my.namespace.a.b;
Lets say you have a function in [b] that has a parameter or return value
that of a type that belongs to [a]. When you consume it, you'll have to
import both namespaces. This one has come back to bite me in more ways than
one before I realized the problem and the solution. Just import all the
relevant namespaces. There is a possibility (though I'm not sure because I
don't understand the problem) that this could be the case.
Thanks,
Shawn www.zenofdotnet.com
Coming soon
"Mike" <an*******@discussions.microsoft.com> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl... thanks that helped.
I'm in the process of learning C# and while converting a VB.NET app to C# So i'll be asking alot of questions
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:Ol*************@TK2MSFTNGP10.phx.gbl... Mike,
TableViewer looks like a class. Just do:
using LookAtTable;
And it should work. You want to use the using statement for the namespace that the classes are in, not the class itself (although you
can alias a class name, if you want).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mike" <an*******@discussions.microsoft.com> wrote in message news:er**************@tk2msftngp13.phx.gbl... when i do that though i"m getting a namespace error, But I can
reference this same DLL in a VB.NET application I have this in the begining of the code with all the other using statements.
using LookAtTable.TableViewer;
and when i compile it i get
A using namespace directive can only be applied to namespaces 'LookAtTable.TableViewer' is a class not a namespace.
do i not use the USING statement with this like i use the import statement in VB.NET?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
wrote in message news:eG**************@TK2MSFTNGP11.phx.gbl... > Mike, > > Yes, you can. VB.NET compiles to IL, just like C# does. This means > that if you develop an assembly in VB.NET, you can easily reference
it in > C#. All you have to do is set a reference and you should be set. > > Hope this helps. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard.caspershouse.com > > "Mike" <an*******@discussions.microsoft.com> wrote in message > news:O$*************@TK2MSFTNGP11.phx.gbl... > > I have a C# windows app and i need to use a VB.NET component to
talk to > > several servers. > > Can i use the VB.NET component with my C# application? > > > > thx > > > > > >
Yes! Just add a reference to the VB.NET component and everything will just
work.
-Joel
-------------------- From: "Mike" <an*******@discussions.microsoft.com> Subject: VB.NET component Date: Mon, 10 May 2004 11:48:15 -0400 Lines: 7 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <O$*************@TK2MSFTNGP11.phx.gbl> Newsgroups: microsoft.public.dotnet.languages.csharp NNTP-Posting-Host: gatekeeper.travelers.com 204.89.226.65 Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11
phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.csharp:243091 X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
I have a C# windows app and i need to use a VB.NET component to talk to several servers. Can i use the VB.NET component with my C# application?
thx
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chien Lau |
last post by:
I had a situation occur today that's happened a number of times before
and I'd like to get your take on it:
Imagine... You're developing a WinForms app for a client that includes
the use charts....
|
by: orangepic333 |
last post by:
Could someone tell me what's the difference between the two?
Is it that a class is used within an OO language while a component can
be exported between OO languages?
Are there other...
|
by: Edward Diener |
last post by:
How does one specify in a component that a property is a pointer to another
component ? How is this different from a property that is actually an
embedded component ? Finally how is one notified in...
|
by: Jordan Bowness |
last post by:
I make a similar post in another newsgroup, but this example is
simplified somewhat.
I have a component (cmpMyComponent) with 2 properties. The 1st property
is a string value (Description) and...
|
by: AMDRIT |
last post by:
Hello everyone,
I have created a custom component and one of its properties is a class
object with it's own properties. During runtime, I can assign values to the
class object properties just...
|
by: Rob Griffiths |
last post by:
Can anyone explain to me the difference between an element type and a
component type?
In the java literature, arrays are said to have component types, whereas
collections from the Collections...
|
by: Edward Diener No Spam |
last post by:
The definition of a component model I use below is a class which allows
properties, methods, and events in a structured way which can be
recognized, usually through some form of introspection...
|
by: Joe |
last post by:
Is it possible to have a component which is global to the entire
application? I need to have a single component act sort of like a server
which components in any of the forms can access.
For...
|
by: BillGatesFan |
last post by:
I have a web service which calls a .NET queued serviced component in
COM+. I turned statistics on for the component. I call the component
10 times, 10 objects get created but they do not go away....
|
by: bharathreddy |
last post by:
In .Net COM+ components are referred to as serviced components,
Namespace: System.EnterpriseServices;
Advantage of Serviced Components:
object pooling,
database connection pooling,
|
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: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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...
|
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,...
| |