Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Calling C# Managed code in VB

Calling C# Managed code in VB

Scheduled Pinned Locked Moved C#
questioncsharpdotnet
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    satsumatable
    wrote on last edited by
    #1

    Hi, How can i call C# managed code in VB? , Will it allow me to access all CLR properties? Thanks

    M S D J 4 Replies Last reply
    0
    • S satsumatable

      Hi, How can i call C# managed code in VB? , Will it allow me to access all CLR properties? Thanks

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      you can reference the C# dll from your VB project and I have no idea what you mean by CLR properties. Whatever you expose in your code is available.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • S satsumatable

        Hi, How can i call C# managed code in VB? , Will it allow me to access all CLR properties? Thanks

        S Offline
        S Offline
        Spoon65
        wrote on last edited by
        #3

        I suppose you are trying to use a C# library from VBA code? I made a library for Excel recently and this site helped me a lot, maybe it helps you two: a beginner's guide to calling a net library from excel

        1 Reply Last reply
        0
        • S satsumatable

          Hi, How can i call C# managed code in VB? , Will it allow me to access all CLR properties? Thanks

          D Offline
          D Offline
          Dragonfly_Lee
          wrote on last edited by
          #4

          VB or VB.net? If it is VB, you need to realize the COM object. If it is VB.net, just add the reference to project.

          Tan Li I Love KongFu~

          1 Reply Last reply
          0
          • S satsumatable

            Hi, How can i call C# managed code in VB? , Will it allow me to access all CLR properties? Thanks

            J Offline
            J Offline
            Jason C Bourne
            wrote on last edited by
            #5

            The .Net compiler produces "intermediate language code" from the higher-level language, which is for example C# or VB.Net. This intermediate language code is common to all languages, and this is the code that actually gets executed by the framework. Therefore, if you compile a C# project, it just becomes a .Net assembly; it is almost an executable, it is not your text source file anymore. From the moment that you reference it in your VB.Net project, it becomes available to your VB.Net code as if it was written in VB.Net.

            Jean-Christophe Grégoire

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups