Results 1 to 4 of 4

Thread: VB and C#

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

    VB and C#

    Hi

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

    thanks
    CodeNameVirus

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


    Sorry...
    09:F9:11:02:9D:74:E3:5B8:41:56:C5:63:56:88:C0

  3. #3
    Senior Member Aardpsymon's Avatar
    Join Date
    Feb 2007
    Location
    St Annes (aaaa!)
    Posts
    434
    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
    Posts
    557
    Hi

    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.

    Cheers


    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
  •