473,394 Members | 1,658 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,394 software developers and data experts.

merge two language (vb.net)

15
how to merge to language vb.net and C# in one? i try to merge C# language and vb.net into one project using visual studio 2003. please help me... urgent
Sep 4 '07 #1
3 1092
phvfl
173 Expert 100+
Hi Taufik,

You are able to add two projects in different .NET languages into the same solution. However, you are not able to add code in different languages in the same assembly (project). To put the code into the same project you would need to convert all of the code into the same language.
Sep 4 '07 #2
taufik
15
hello...
so you mean that i able to add new existing project into my existing project.
ok... but how can i call all function in others existing project since it split into two project? or i need to add something to make the both project can communicate? please... this is very important to me....
Sep 4 '07 #3
phvfl
173 Expert 100+
hello...
so you mean that i able to add new existing project into my existing project.
ok... but how can i call all function in others existing project since it split into two project? or i need to add something to make the both project can communicate? please... this is very important to me....
Lets assume that you have a solution called solution1 (by default the root namespace would be the same). An existing project (VB) is called class1 and the code is:
Expand|Select|Wrap|Line Numbers
  1. Public Class class1
  2.   Public Function vbMethod() As String
  3.     Return "value from vb"
  4.   End Function
  5. End Class
  6.  
A second class in C# can use the method from the first class as such:
Expand|Select|Wrap|Line Numbers
  1. public class class2{
  2.   public void csharpMethod(){
  3.     String myString;
  4.     myString = class1.vbMethod();
  5.   }
  6. }
  7.  
The variable myString should be "value from VB". You would need to add a reference in the C# project to the VB project to access the class but that is all.
Sep 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different...
2
by: pieter.breed | last post by:
Hi All, The company I work for has traditionally used COM/ActiveX for the solutions that it provides. We are in the process of moving to .NET and a few applications have been written in VB.NET...
30
by: DJ van Vliet | last post by:
Hi All, Question regarding the processes between C#, ADO.NET and MS-SQL I need to understand the complexities of using the distributed method (ADO.NET) of data retrieval and the subsequent...
12
by: batista | last post by:
Hello there, I am currently working in .net. Now i need to know that in order to build a server/client architecture which one is more suitable Vc++ or ..net. There is a server in our company...
12
by: koorb | last post by:
Is there any reason why Microsoft is keeping the languages separate or will they eventual replace all the languages with one, just to simplify? And why do people keep talking about switching to...
18
by: Jordan | last post by:
In OOP literature we read frequently about "interface" - a term which is apparently used to mean different things depending on context and possibly language. ..NET however provides for the...
1
by: Gary Brown | last post by:
Hi, I cannot get MDI menus to merge correctly in my .Net 2005 application. They merged in 2003. I've tried every combination of merge action to no avail. Can someone point to an example of a...
4
by: tomas_nordlander | last post by:
Hi, I and a college are working on 2 projects, one in C# and one in Vb.NET, and would like to connect the projects using VB.NET project as the main GUI and let an search algorithm in C# do the...
14
by: sonu | last post by:
Explain limitations of .NET Technology. How Java is better than .NET?
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: 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...
0
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
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.