Char.IsControl tells whether the character is categorized as a control character.
Module ControlChar Public Sub Main() Dim sentence As String = "This is a " & vbCrLf & "two-line sentence."
For ctr As Integer = 0 to sentence.Length - 1 If Char.IsControl(sentence, ctr) Then
Console.WriteLine(Convert.ToInt32(sentence.Chars(ctr)).ToString("X4")) End If
Next End Sub End Module