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. Create a .NET dll

Create a .NET dll

Scheduled Pinned Locked Moved C#
csharpdebugginghelptutorial
6 Posts 2 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.
  • T Offline
    T Offline
    Tyler45
    wrote on last edited by
    #1

    I have a problem while making dll. i write methods in to dll and on my project i give reference and task(i am sure that i have no mistake at using dll part) but i when i use dll method debugger gives me this method is in (ExDll.dll) how can create a methods in dll, can any one give me step by step solution. Thanks Best Regards

    C 1 Reply Last reply
    0
    • T Tyler45

      I have a problem while making dll. i write methods in to dll and on my project i give reference and task(i am sure that i have no mistake at using dll part) but i when i use dll method debugger gives me this method is in (ExDll.dll) how can create a methods in dll, can any one give me step by step solution. Thanks Best Regards

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Create a dll project add a method compile Unless there's something you're not telling us, there are no special steps required. What is your problem ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      T 1 Reply Last reply
      0
      • C Christian Graus

        Create a dll project add a method compile Unless there's something you're not telling us, there are no special steps required. What is your problem ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        T Offline
        T Offline
        Tyler45
        wrote on last edited by
        #3

        I assumed that i have added a method but after i included it vs doesnt see this method here is the dll code using System; using System.Collections.Generic; using System.Text; namespace ExDLL { public class Class1 { public static int ExMethod(int a, int b) { return a + b; } } } Thanks, i wait your reply

        C 1 Reply Last reply
        0
        • T Tyler45

          I assumed that i have added a method but after i included it vs doesnt see this method here is the dll code using System; using System.Collections.Generic; using System.Text; namespace ExDLL { public class Class1 { public static int ExMethod(int a, int b) { return a + b; } } } Thanks, i wait your reply

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          The line ExDLL.Class1.ExMethod(1, 2) will return 3, if you have a reference to the DLL in your project.  The most common mistake here, is to forget about scoping the namespace, either directly or with a using statement.

          Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

          T 1 Reply Last reply
          0
          • C Christian Graus

            The line ExDLL.Class1.ExMethod(1, 2) will return 3, if you have a reference to the DLL in your project.  The most common mistake here, is to forget about scoping the namespace, either directly or with a using statement.

            Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

            T Offline
            T Offline
            Tyler45
            wrote on last edited by
            #5

            Hello; In .net side, after i add reference to dll, should i use it like int r = ExDLL.Class1.ExMethod(3,4);

            C 1 Reply Last reply
            0
            • T Tyler45

              Hello; In .net side, after i add reference to dll, should i use it like int r = ExDLL.Class1.ExMethod(3,4);

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Yes, unless you have using ExDLL inside the class.

              Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

              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