This has to be an easy question, but I cannot figure out how to create a list of names separated by commas without having a trailing comma at the end.
So here is my code...
For Each u In users
userList.Append(u.FirstName)
userList.Append(" ")
userList.Append(u.LastName)
userList.Append(", ")
Next
This creates a list, but it always looks likes this:
James Smith, Chris Williams, Zoey Babcock,
How do I get generate a list without an extra comma at the end?
Thanks
Here is the working code thanks to all the help:
Dim fullNames = (users.Select(Function(u) u.FirstName + " " + u.LastName))
Dim userList As String = String.Join(", ", fullNames)