Get Distinct from String

Dim strValues As String = "100,150,200,250,300,150,100"

Dim ArrSelect() As String = strValues.ToString.Split(",")

Dim distinct As IEnumerable(Of String) = ArrSelect.Distinct()


Dim strDistinct As String = String.Join(",", distinct)
MessageBox.Show(strDistinct)

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)