DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to call a vb.net class from C#

  1. #1
    Enoch Guest

    How to call a vb.net class from C#


    Hi,

    If I have a class called Rs232 in vb.net and wish to
    access that class from a form in C# how do I go about
    doing this? i.e. do I have to place the Rs232.vb file in a
    particular folder etc.

    Thanks


  2. #2
    Jeff Johnson Guest

    Re: How to call a vb.net class from C#


    "Enoch" <enochtsang@hotmail.com> wrote:
    >
    >Hi,
    >
    >If I have a class called Rs232 in vb.net and wish to
    >access that class from a form in C# how do I go about
    >doing this? i.e. do I have to place the Rs232.vb file in a
    >particular folder etc.
    >
    >Thanks
    >


    If you're using visual studio, open a new solution in one language... then
    add another project in the other language. The classes in both projects
    should be able to talk to each other-- but I think you need to reference
    the other *project* first.

    Another way to share code from different languages is to compile code into
    a dll library. Copy the dll to the other project and reference it. (Visual
    Studio is nice enough to copy it for you if you reference it within the IDE....)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center