How to cast a List object of chars in an Array of chars?
How to convert or make a cast of a List object typized as a container of chars like
Dim mylist As List(Of Char) = New 开发者_StackOverflow社区List(Of Char)(New Char() {"1"c, "2"c})
in a simple array of chars as
Dim mychars() As Char
without make a loop for...
thank you
Max
Have you tried the List(Of T).ToArray
method?
For example:
Dim myChars() as Char = myList.ToArray()
精彩评论