:
Dim myChars(30) As Char
myChars(0) = "h"c ' cannot convert string to char
myChars(1) = "i"c ' under option strict (narrowing)
Dim myStrA As New String(myChars)
Dim myStrB As String = CStr(myChars)
:
. 2 NET-, - VB. , , 31 , 2 :

- null/Nothing, Char Chr(0) NUL. NUL String, NUL Console, MessageBox .. , , .
, , char, - . NUL Char, :
Console.WriteLine(myStrA.Length) ' == 31
, Trim ? MSDN ( Intellisense) :
[Trim] String.
/Chr (0) , Tab, Lf, Cr Space, .
String.Trim , :
myStrA = myStrA.Trim(Convert.ToChar(0))
' using VB namespace constant
myStrA = myStrA.Trim( Microsoft.VisualBasic.ControlChars.NullChar)
:
' nuls and spaces:
myStrA = myStrA.Trim(Convert.ToChar(0), " "c)
/ char:
For n As Int32 = 0 To myStrA.Length
Console.Write("{0} is '{1}'", n, myStrA(n)) ' or myStrA.Chars(n)
Next
0 - 'h'
1 - "i"
2 - '
( CRLF.) char, :
myStrA(2) = "!"c
, .
. :
ASCII