How To Create A Dynamic Link Library (DLL) And Consume It

This program elaborate the concept of Dynamic Link Library (dll). How to create a dll and use it in the other file.

Create a file and save it with the name :- Class_Dll.cs
---------------------------------------------------------------------------------------

using System;

public class Class_Dll
{
public void Display()
{
Console.WriteLine("Hi ! I am in Class_Dll");
}
}

----------------------------------------------------------------------------------------
Command To Create a dll is given below :-


After the successfully created a dll file you get a file name :- Class_Dll.dll



Now Create a second file and save it with the name :- DllConceptTest.cs
---------------------------------------------------------------------------------------

using System;

class DllConceptTest
{
public static void Main()
{
Class_Dll cdll= new Class_Dll();

cdll.Display();
}
}
----------------------------------------------------------------------------------------
How to compile and run this file is given below :-



How To Create A Dynamic Link Library (DLL) And Consume It How To Create A Dynamic Link Library (DLL) And Consume It Reviewed by Baljeet Singh on 09:10 Rating: 5

No comments:

Powered by Blogger.