Forum Home
Press F1
 
Thread ID: 110675 2010-06-27 20:53:00 C# running VB Mike (15) Press F1
Post ID Timestamp Content User
1113941 2010-06-27 20:53:00 I have some C# code that I want to call another tool which is written in VB. Will this work? Or will I need to convert one of them to the other??

If I need to convert, anyone know of an easy way to do this? I'm not familiar enough with either language at this stage...

Thanks,
Mike.
Mike (15)
1113942 2010-06-27 21:19:00 You can't (usually) mix languages in the same source files, but if you compile the C# stuff into a separate library resource you should be able to call its functionality from your VB application using standard library interfaces. Erayd (23)
1113943 2010-06-28 07:28:00 You can't (usually) mix languages in the same source files, but if you compile the C# stuff into a separate library resource you should be able to call its functionality from your VB application using standard library interfaces.

Yup - that's one of the benefits of .NET.
somebody (208)
1113944 2010-06-28 08:50:00 Yup - that's one of the benefits of .NET.
Mmm, it's not specific to .NET, you can do that with any language capable of compiling to 'normal' binaries, as long as that language has library support (and almost all of them do).
Erayd (23)
1113945 2010-06-28 16:21:00 You can't (usually) mix languages in the same source files, but if you compile the C# stuff into a separate library resource you should be able to call its functionality from your VB application using standard library interfaces.Just to clarify, that goes both ways - you can call the VB stuff as a library from a C# app, or you can call the C# stuff as a library from a VB app. Erayd (23)
1