vb System.String.Chars类(方法)实例源码

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

作者:VB.NET开发    项目:Syste   
Console.Write("Type a string : ")
Dim myString As String = Console.ReadLine()
Dim i As Integer
For i = 0 To myString.Length - 1
   If Uri.IsHexDigit(myString.Chars(i)) Then
      Console.WriteLine("{0} is a hexadecimal digit.", myString.Chars(i))
   Else
      Console.WriteLine("{0} is not a hexadecimal digit.", myString.Chars(i))
   End If 
Next
' The example produces output like the following:
'    Type a string : 3f5EaZ
'    3 is a hexadecimal digit.
'    f is a hexadecimal digit.
'    5 is a hexadecimal digit.
'    E is a hexadecimal digit.
'    a is a hexadecimal digit.
'    Z is not a hexadecimal digit.

作者:VB.NET开发    项目:Syste   
Dim str1 As String = "Test"
For ctr As Integer = 0 to str1.Length - 1
   Console.Write("{0} ", str1(ctr))
Next


问题


面经


文章

微信
公众号

扫码关注公众号