Home
C# Visual Studio 2019 Create DLL
Really simple to create a DLL in VS2019
File --> New Project --> in the search box type DLL otherwise you'll have to scroll through loads of options

Choose the C# Class Library - unless ya wanna do it in VB.
Give the project a name, preferable summat relevant. Also choose the .NET Framework. Might be best to wind it back if you aint sure where it's going to end up.
Go to Create then you'll be presented with

And away you go...WAIT. Here's an example to get you going.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MasterDLL
{
public static class Class1
{
public static string MyHello()
{
string x = "Hello World";
return x;
}
}
}
The mistake I made was to not insert the "static". Dunno what it means but it works now.
To create the DLL
Build --> Build Solution
You'll find your DLL in the folder listed in the output

Drop this into your Bin folder of the web page and add a "using..." and away ya go.
Reader's Comments
Name
Comment
Add a RELEVANT link (not required)
Upload an image (not required)
Uploading...
Home