|
-
Apr 28th, 2004, 03:26 AM
#1
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 live here any more.
-
Apr 28th, 2004, 06:48 AM
#2
Fanatic Member
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).
-
Apr 28th, 2004, 07:35 AM
#3
I feared that.
Does anyone else have any thoughts?
I don't live here any more.
-
Apr 28th, 2004, 08:01 AM
#4
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...
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Apr 28th, 2004, 09:28 AM
#5
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
-
Apr 28th, 2004, 09:34 AM
#6
Fanatic Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|