How to extract part of the strings from array of strings with VB.NET

1 Answer

0 votes
Imports System
Imports System.Linq

Public Class Program
	Public Shared Sub Main()
        Dim array As String() = {"c#", "vb", "c", "c++", "java", "python"}
        Dim result = array.Skip(2).Take(3).ToArray()

        For Each str As String In result
            Console.WriteLine(str)
        Next
    End Sub
End Class






' run:
'
' c
' c++
' java
'

 



answered Sep 1, 2023 by avibootz

Related questions

...