On Fri, 21 Nov 2008 15:57:26 -0800, shapper <md*****@gmail.comwrote:
Hello,
I need to replace the last comma in a string by " and ". How can I do
this?
http://msdn.microsoft.com/en-us/libr...stindexof.aspx
That link will help you solve the first half of the problem. I leave it
as an exercise for you to solve the second half, but I'll provide a hint:
generally speaking, if you want to know what you can do with an instance
of String, you should look at the "Class Members" documentation page on
MSDN. Often you will find that there is already method to accomplish your
goal or, at the very least, one that would be helpful.
You could have answered the first half of this question by using that
hint, and you should be able to answer the second half by doing so as well.
Pete