Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Create your online store today with Shopify

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Disclosure: My content contains affiliate links.

43,239 questions

56,142 answers

573 users

How to remove duplicate sets of items from a list in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim list As New List(Of String)(New String() {"c#", "vb.net", "c", "c", "php", "php"})

        list = RemoveDuplicatesSet(list)

        Dim s As String = String.Join(" ", list.ToArray())

        Console.WriteLine(s)

    End Sub

    Function RemoveDuplicatesSet(ByVal items As List(Of String)) As List(Of String)
        Dim result As New List(Of String)

        For i = 0 To items.Count - 1
            If (Not result.Contains(items(i))) Then
                result.Add(items(i))
            End If
        Next

        Return result
    End Function


End Module

' run:
' 
' c# vb.net c php java

 



answered Aug 27, 2018 by avibootz
...