vb System.Char.IsControl类(方法)实例源码

下面列出了vb System.Char.IsControl 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:Syste   
Module ControlChars
   Public Sub Main()
      Dim charsWritten As Integer = 0

      For ctr As Integer = &H0 To &HFFFF
         Dim ch As Char = Convert.ToChar(ctr)
         
         If Char.IsControl(ch) Then
            Console.Write("\U{0:X4}    ", ctr)
            charsWritten += 1 
            If (charsWritten Mod 6) = 0 Then 
               Console.WriteLine()
            End If    
         End If
      Next
   End Sub
End Module

作者:VB.NET开发    项目:Syste   
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("Control character \U{0} found in position {1}.", _
             Convert.ToInt32(sentence.Chars(ctr)).ToString("X4"), ctr)
          End If
       Next   
   End Sub
End Module


问题


面经


文章

微信
公众号

扫码关注公众号