How To Split A String Into Array Based On Delimitter In VB.Net
How can I assign a split parts of a string into an array list directly ?
Not sure what you want but doesn’t the following serve your purpose?
Dim input As String = "ABC;PQR;XYZ" Dim x As New List(Of String)(input.Split(";"c))
Notice that I’ve used the superior
System.Collections.Generic) instead of the deprecated
Also, do you really need a modifiable
List? Unless you want to add or remove entries, a plain array should be fine.
- → Add Product Variant - 404 Error
- → How to make open graph links work with 301 redirects
- → How to ignore missing nodes when deserialising json in .NET
- → Need help in Visual Basic program
- → How to save a textbox query result to a database after editing it? - MS Access
- → Is there a database option that is local and does not require lots of overhead
- → Need Helping in Writing Text Files in VB
- → Server Error in '/' Application VB.NET
- → Compare date fields into two datatables
- → Unrecognized database format when filling DataAdapter
- → Reliable timer in a console application
- → What is the best way to handle multiple permission types?