473,399 Members | 3,401 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,399 software developers and data experts.

Calling C# code from VisualBasic

I'm developing an application for a PocketPC using VisualBasic.NET. I would
like to incorporate some code which is written in CSharp.NET. Is it possible
to call C# code from a VB application? What methods could I use to
accomplish this? Thanks in advance for everyone's help.
Jul 21 '05 #1
3 1354
"SkyRender" <Sk*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I'm developing an application for a PocketPC using VisualBasic.NET. I
would
like to incorporate some code which is written in CSharp.NET. Is it
possible
to call C# code from a VB application?
Yes it is.
What methods could I use to
accomplish this?
The simplest would be to compile the C# code as a DLL, and then just
reference it in your VB.NET application.
Thanks in advance for everyone's help.

Jul 21 '05 #2
Thanks for the speedy response. I'm actually including a DLL in my C#
application. Would it cause problems if I compiled a project as a DLL if
that project included another DLL itself?

"Sean Hederman" wrote:
"SkyRender" <Sk*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I'm developing an application for a PocketPC using VisualBasic.NET. I
would
like to incorporate some code which is written in CSharp.NET. Is it
possible
to call C# code from a VB application?


Yes it is.
What methods could I use to
accomplish this?


The simplest would be to compile the C# code as a DLL, and then just
reference it in your VB.NET application.
Thanks in advance for everyone's help.


Jul 21 '05 #3
SkyRender <Sk*******@discussions.microsoft.com> wrote:
Thanks for the speedy response. I'm actually including a DLL in my C#
application. Would it cause problems if I compiled a project as a DLL if
that project included another DLL itself?


No - because it doesn't include a DLL, it just references it. Depending
on what the VB.NET application does, that may need to reference the
extra DLL too.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4

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

Similar topics

6
by: Julie | last post by:
I have a situation where I have multiple objects that aren't related in any way (no base class), but all have a couple of common methods/properties. I'm looking for a clean way to call a...
6
by: Ieuan | last post by:
Hello all and Happy New Year, I've been having this problem for some time and thought I'd try to see if anyone else out there has had the same problem or can give a little help. I'm using a...
39
by: Abubakar | last post by:
I want to get characters for given ascii codes. Dont wanna use the CHR or ChrW functions. What r the .NET equivilents of the Chr & ChrW functions? Regards, Abubakar.
2
by: Jusan | last post by:
hi, I have written a cheque writing utility in vb.net and would like to invite comments on the code. can this be done in a better / faster / shorter way? thnx Public Class...
3
by: SkyRender | last post by:
I'm developing an application for a PocketPC using VisualBasic.NET. I would like to incorporate some code which is written in CSharp.NET. Is it possible to call C# code from a VB application? ...
4
by: aziz001 | last post by:
I have a form where a person can select how many of a product they want e.g. 1x2g Syringe, 15x100g jar etc. The code will then display string output in a label, listing the products that have a...
2
by: Ceefour | last post by:
In case anyone is wondering... (this is based on a conversation with "Juan C. Santaella" <santaell@telcel.net.ve>, I'm sharing here so anyone won't have to go through what I went through again)...
9
by: Problematic coder | last post by:
The intention is to call a stored proceedure which sets flags in the database, this requires no parameters and the page does not need an output from the stored proceedure, though is this is...
12
by: Marc Gravell | last post by:
A long time ago we discussed an issue with id-based queries in LINQ-to-SQL; as an update, it is now suggested that this is fixed in 3.5 SP1. Full info:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
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...
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,...
0
isladogs
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...

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.