Now we create another application and take this DLL (CreatingDLL.dll) reference for accessing DLL’s method. Step 3:- Now build the Application and see bin\debug directory of our project. / sum is method that take two integer value and return that sum Step 2:- Within Class1.cs we create a method named ‘sum’ that takes two integers value and return sum to witch method passed numbers. We will be use this namespace in our project to access this class library.
When we double click on Class1.cs, we see a namespace CreatingDLL. Select your project name and appropriate directory click OKĪfter Clicking on button ‘OK’, solution explorer adds one C# class ‘Class1.cs’. Step 1:- File->New->Project->Visual C# Projects->Class Library.
while it used winforms instead of console application, I think you will be able to use it.
#C sharp mac convert exe to app windows 8.1
NET 4.5 (or 4.0 if I need to depending on server), Windows 8.1 I want to be able to just then create simple apps that just go BetfairBOT myBOT = new BetfairBOT()Į.g 2/3 lines of code to implement my DLL that is registered to my app. Is there a way I can EASILY convert an existing console project into a class / DLL project with some tool or command in VS? The new codebase is much larger than the old one and I would have been able to copy the 4 files from the old system into a DLL app and then create various console apps/services to implement the DLL - however because it's 40+ files I don't want a copy n paste job if possible. However now I have been asked to do various different jobs with the code and I don't want to write a console app for each job (different sites want prices, bets placed etc) I am rewriting the Betfair API to JSON from SOAP and I have started off the way I did it before as a console APP which is then called from a task scheduler or win service.