Results 1 to 6 of 6

Thread: Class Libraries

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    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.

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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).

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    I feared that.

    Does anyone else have any thoughts?
    I don't live here any more.

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    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...

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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
  •  



Click Here to Expand Forum to Full Width