Need some help with a trivial dll/string method.

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2007
Posts: 35
Reputation: Ratte is an unknown quantity at this point 
Solved Threads: 0
Ratte's Avatar
Ratte Ratte is offline Offline
Light Poster

Need some help with a trivial dll/string method.

 
0
  #1
Jan 29th, 2008
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.
Last edited by Ratte; Jan 29th, 2008 at 4:22 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 172
Reputation: Jugortha is an unknown quantity at this point 
Solved Threads: 16
Jugortha Jugortha is offline Offline
Junior Poster

Re: Need some help with a trivial dll/string method.

 
0
  #2
Jan 29th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC