943,884 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 1104
  • C# RSS
Jan 29th, 2008
0

Need some help with a trivial dll/string method.

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Light Poster
Ratte is offline Offline
38 posts
since Oct 2007
Jan 29th, 2008
0

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

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
Reputation Points: 11
Solved Threads: 16
Junior Poster
Jugortha is offline Offline
172 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: New project idea
Next Thread in C# Forum Timeline: solution for login page





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC