How to find all uppercase characters in a string with VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "VB.NET C# C C++ Python NodeJS"
        Dim size As Integer = str.Length

        For i As Integer = 0 To size - 1
            If str(i) >= "A"c AndAlso str(i) <= "Z"c Then Console.Write(str(i) & " ")
        Next
    End Sub
End Class




' run:
'
' V B N E T C C C P N J S
'

 



answered Apr 20, 2022 by avibootz
...