FromDelimitedString

        ''' <summary>
        ''' Populates a list with the contents of a delimited string.
        ''' </summary>
        ''' <param name="ls"></param>
        ''' <param name="buf"></param>
        ''' <param name="delimiter"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <Extension()> _
        Public Function FromDelimitedString(ByVal ls As List(Of String), ByVal buf As String, ByVal delimiter As String) As List(Of String)            
            Dim items() As String = Split(buf, delimiter)
            Return items.ToList
        End Function
Example:
        Dim buf As String = "Bill|Jim|John|James|Jacob"
        Dim ls As New List(Of String)
        ls = ls.FromDelimitedString(buf, "|")

Description

Returns a string list from a delimited string where you provide the delimiter.

Details

Double click on the code to select all.

 

;