Click here to Skip to main content
11,720,785 members (83,910 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
Please anybody tell me How to make dll.
Posted 6-Mar-13 17:31pm
Sergey Alexandrovich Kryukov at 6-Mar-13 23:32pm
This is a forum for software developers... If Visual Studio itself don't tell you that, what's the use of our help. Next time you will ask how to make .EXE, then what, how to create a code file? :-)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi there,whatever Sergey Sir told is absolutely right but let me help u out.
go to
File Menu->New->Project->Class Library template and click OK.
it will open a Class1.cs page for you.
public class Class1
    public int Add(int a, int b)
        return a + b;

now build your project .And add another console Application using Add Project tab.
and now Add refresnces of ClassLibrary1 in your console Application(go to Refrences->Add Refrences->Browse->ClassLibrary1Projoect->bin->debug->ClassLibrary1.dll).
and use below code on Program.cs page:
using System;
using ClassLibrary1;
namespace ConsoleApplication1
    class Program
        static void Main(string[] args)
            Class1 c = new Class1();
          Console.WriteLine( c.Add(10, 16));

now run this ConsoleApplication for getting addition using .DLL concept.

so jmd
Smile | :)
deva936 at 5-Apr-13 22:53pm
really thanks a lot. i got it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 2,179
1 OriginalGriff 924
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540

Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 6 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100