| | |
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 access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox concurrency control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ globalization httpwebrequest image index input install java label list listbox listener mandelbrot math microsoftc#visualexpress mouseclick mysql networking operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





