Hi!
Is there a way in C# to convert an array to a string without looping through it?
arItems[0] = "A";
arItems[1] = "B";
and string sItems should be "A, B".
Hm, .NET framework has a lot of ways to do the same thing. I wouldn't have thought that specific of a method existed, but I should have looked for it first I guess.
m4pv, I you have a lot of items in the array, I would think the foreach would be more elegant than a bunch of joins.
oppcos, The very richness of the .NET framework can actually make it more difficult to deal with at times. You start researching how to do something, find 10 different examples, some of which are are simply brutal. Then you find a 2 line sweet solution coming out of a completely different namespace, none of the others thought of looking in. Some of the shortcomings are surprising, but on the other hand the depth of the library is amazing at times.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.