| | |
Need some help with a trivial dll/string method.
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
I am very new to Visual Studio/C# (although I have a good deal of C and C++ knowledge) and it seems that I am missing something since I cannot figure out how to do this and I am getting frustrated (this is supposed to be a simple project).
I am supposed to write a DLL with a class that has a method accepting two strings and returning one.
This dll will be used by a windows form application. I will be entering two strings on the form, clicking a button and the button will call the DLL which will then return another string into a text field on the form.
The return string will consist of a couple of other strings (assembly version number major/minor, etc.) appended to one of the original strings passed to the dll (ie., the other string passed in will be ignored).
My problem is I don't know where to start. Is there any way I can do this without string manipulators? I don't think I am supposed to use them. If I use Console.WriteLine, I am guessing this will not return the message to the form, but write it to the console?
Thanks for any help you can provide.
I am supposed to write a DLL with a class that has a method accepting two strings and returning one.
This dll will be used by a windows form application. I will be entering two strings on the form, clicking a button and the button will call the DLL which will then return another string into a text field on the form.
The return string will consist of a couple of other strings (assembly version number major/minor, etc.) appended to one of the original strings passed to the dll (ie., the other string passed in will be ignored).
My problem is I don't know where to start. Is there any way I can do this without string manipulators? I don't think I am supposed to use them. If I use Console.WriteLine, I am guessing this will not return the message to the form, but write it to the console?
Thanks for any help you can provide.
Last edited by Ratte; Jan 29th, 2008 at 4:22 pm.
•
•
Join Date: Oct 2007
Posts: 172
Reputation:
Solved Threads: 16
To enable your client application consuming the dll assembly you must add a reference to your client application
To do that open the solution explorer right click on the references node and select add reference
a form named Add reference will appear with several tabs select Browse tab the browe to the assembly location and add it
the assembly namespace will apear in the intellisense then you can use your method
for using string I advise you to use a StringBuilder class it's better in terms of memory optimisation
To do that open the solution explorer right click on the references node and select add reference
a form named Add reference will appear with several tabs select Browse tab the browe to the assembly location and add it
the assembly namespace will apear in the intellisense then you can use your method
for using string I advise you to use a StringBuilder class it's better in terms of memory optimisation
![]() |
Other Threads in the C# Forum
- Previous Thread: New project idea
- Next Thread: solution for login page
| Thread Tools | Search this Thread |
.net 2007 access algorithm appportability array barchart bitmap box broadcast c# camera check checkbox client combobox control conversion cs4 csharp custom database datagrid datagridview dataset date datetime degrees development draganddrop drawing encryption enum event eventcloseformc# excel file form format forms function gdi+ handler httpwebrequest image index input install java keypress label list listbox listener listview load mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting resolved. richtextbox search security server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation view visual visualstudio webbrowser windows winforms wordautomation wpf xml





