473,386 Members | 1,720 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,386 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 1353
"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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
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...
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...

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.