Creating a dll but need to reference a changeable function/ void/ code

So I am creating a dll and what it does is it basically authenticates a username and password with a server and if it wrong it writes failure in an output box and if it is correct it launches another form or does whatever the person who is using the dll wants it to do. Here is the code:

using (StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()))
                LaunchCode.Globals.output = "SUCCESS" + Environment.NewLine;
                //Success action 
                json = streamReader.ReadToEnd(); //---Can't get the nested JSON, read the entire response minus the 200 code.

Where I have “//Success action” is where the code would go for whatever the user wants the dll to do (open a form, open a message box, etc) but this being a dll the user doesn’t have access to the code. So I wanted to have the dll reference a void or what ever would work, in a different form. I tried looking for example on how to do this on google but I couldn’t really find anything and I really have no idea on how to accomplish this.

If you need me to clarify anything just ask and Thanks for the help in advance.

Source: dll

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.