How to License a .NET DLL tagrgeted to FW 4.0

We have developed a .NET DLL using Visual studio 2015 targeted to .NET framework 4.0 . This DLL can be used in Winform, WPF and Web applications. We need to implement licensing functionality for Design time and runtime . Could you please suggest the best way to do that .

Note: This is just a .NET DLL NOT a component