Link to home
Start Free TrialLog in
Avatar of RSSIAdmin
RSSIAdmin

asked on

.NET C# stringtok equal to Java.

Hi Expert:

I am creating a string with a list of words and each word is to be separated by a comma (name1,house,doe,truck,work etc...).

I don't know actually how many words will be in the list until the end of the function.

I worked something up ( stringvar+= ", ") to put a comma in between each word.

But in the case when function ends with only one word in the list , I get a comma after that one word which is not what I want!

I know I can strip the comma off the one word string at the end of function but how do the experts do this whole thing?

SOLUTION
Avatar of nauman_ahmed
nauman_ahmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial