Results 1 to 4 of 4

Thread: VB and C#

  1. #1
    Senior Member codenamevirus's Avatar
    Join Date
    Jun 2005
    Faridabad, Haryana, India

    VB and C#


    Can i use vb(or vb.net) and c#(or c#.net) together in a project? if yes, how?


  2. #2
    THE Bastard Sys***** dinowuff's Avatar
    Join Date
    Jun 2003
    Third planet from the Sun
    Sure It's already been done. It's called Vista


  3. #3
    Senior Member Aardpsymon's Avatar
    Join Date
    Feb 2007
    St Annes (aaaa!)
    you can certainly combine the two .net languages, they will both compile to that wierd MSIL IIRC. As to how you would do it, its been too long since I looked at something more complex than perl or PHP for me to tell you :/
    If the world doesn't stop annoying me I will name my kids ";DROP DATABASE;" and get revenge.

  4. #4
    Senior Member
    Join Date
    Mar 2004

    To be picky: No, you cannot use two different .NET languages in one project.
    However, you can use classes/methods/... written in c# in a vb.net-project
    and vice versa.

    A "project", as the term is used in a .NET environment, results (usually) in one
    dll (assembly). An assembly is written in one particular .NET language.

    However, you can add references to a project/assembly written in
    another .NET language, and due to the mechanism of reflections you won't
    see any differences in your development environment (if it is worth something).
    I won't lecture about IL applications and the CLR, but these concepts (similar
    to the philosophy behind java) are responsible for a smooth execution.
    I mention those terms for completeness and for you to google if you want
    to go somewhat deeper.

    (to be even more picky: it is possible in ASP.NET to mix code[1]. However,
    two compilations actually are performed, which corresponds in ordinary
    .NET applications to two separate projects.)

    Good luck.


    P.s. A big hello to everybody here - Unfortunately, I am currently too busy (or unable) to participate more, but I am lurking

    [1] http://www.dotnetbips.com/articles/1...f808f1cd0.aspx
    Last edited by sec_ware; April 21st, 2007 at 06:24 PM.
    If the only tool you have is a hammer, you tend to see every problem as a nail.
    (Abraham Maslow, Psychologist, 1908-70)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

By using this site, you agree to the Privacy Policy