Search This Blog

Wednesday, June 30, 2010

C# - swap Last,First MI fastest way

Programmer Question

Ok, I can certainly do this with some IndexOf, or even a Split(), but I thought I'd throw this out as a bit of a performance teaser.



I have data - like 100K's of these - in LastName,FirstName Mi and I need to make it FirstName Mi Lastname.



I think that SubString/IndexOf(',') can do the job, but was hoping for a more elegant/performant suggestion.



Any better ideas?



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails