Results 1 to 5 of 5

Thread: using c# classes in VB [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    using c# classes in VB [RESOLVED]

    I finished (I hope) a class in C#, saved it, opened up my VB project, added the file to the project, and tried to instantiate an object from it. It's not showing up in Intellisense. what other steps do I need to do in order to use cross-languages?
    Last edited by Andy; Aug 13th, 2004 at 12:09 PM.

  2. #2
    Fanatic Member
    Join Date
    May 2002
    Posts
    746
    Saved the class or compiled it? Think you have to compile classes to use them betwixt languages but I could be wrong.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    that's what was wrong. I tried compiling it and it gave errors. now onto that!! lol

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You can not host a c# and VB class in the same project (dll). You need to compile your C# project as a seperate dll, then reference that dll in your vb application. Or, in your solution, you can have a vb project and a c# project, and just include a project reference from one to the other.

  5. #5
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Hi,

    I am guessing and am probably wrong but I think you need to pupulate all of the "///" comments at the beginning of the function calls, etc... when the intellisense thing pops up with my own functions, it doesnt show me much detail for each parameter. I discovered this is why.

    If it doesn't work, hey presto, you have just commented your code!

    Hope this helps,
    DJ

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