is there any way to remove the element in char array I converted from a String?
Dim myString As String = "Hello"
Dim charArray As Char() = myString.ToCharArray
Your help would be much appreciated.. Thanks
is there any way to remove the element in char array I converted from a String?
Dim myString As String = "Hello"
Dim charArray As Char() = myString.ToCharArray
Your help would be much appreciated.. Thanks
Copyright © 2021 Jogjafile Inc.
Arrays are fixed-length in .NET. You can set an element to
Nothingbut you cannot remove that element. You can use a collection instead of an array and then you can add, insert and remove items at will, but your example isn't necessarily the best case for that sort of thing, e.g.You can then call
RemoveorRemoveAton thatListto remove aChar. You can then create a newStringif desired, e.g.That will display
"Helo".