-
Class Libraries
A few months ago I started to write a class library in C#, but now I'm using VB (because I have that at home, might as well be consistent). But I want to be able to add more classes to the library without having to translate them into C#.
Is it possible to combine 2 or more languages in one class library?
-
I don't think that is possible. You can keep the C# dll and make a new vb dll that adds functionality and also acts as a wrapper for the c# dll though (If you want to funnel everything through one dll).
-
I feared that.
Does anyone else have any thoughts?
-
Hi.
Well, you could try here : http://www.kamalpatel.net/ConvertCSharp2VB.aspx
That will convert the code for you (or at least try...).
Then it's "just" a matter of correcting the things that either couldn't be converted or was converted wrongly.
Normally I don't have much faith in these kinds of tools, because you loose control on how the code should look and so on, but I reckon it's the only way, if you really, really want it in VB, but are too ";)lazy;)" to convert it yourself...:D
-
Ummmm.... actually you CAN (sort of)... that was supposed to be the one of the bene's of .NET... you can build projects that used multiple languages..... yo ucould build your forms in VB, and the data classes in C#. You can't mix languages within the same class/object, but within a project you can.
TG
-
True, if the forms are in one project and the classes in another. But within the same project - I don't see how. You don't even have the option to add a class in another language (That's why you have to select the project type as VBProjects or C#Projects). Within the same Solution you can have mixed projects, but not in the same project.
If you know how, please share cause it would be cool!:)