VB.net Program to Split a string having characters like ;/?.,- in between using Split function of System.String class

Rajnilari2015
Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 120
Imports System.Linq

Namespace ConsoleApplication
Class Program
Private Shared Sub Main(args As String())
"niladri,arina/biswas?babai;RNA.Team-We All Are Same -Is not it?Yes it is".Split(New [Char]() {";"C, "/"C, "?"C, "."C, ","C, "-"C}, StringSplitOptions.RemoveEmptyEntries).ToList().ForEach(Function(i) Console.WriteLine(i))

Console.ReadKey()

End Sub
End Class
End Namespace


Result
-------

niladri
arina
biswas
babai
RNA
Team
We All Are Same
Is not it
Yes it is

Comments or Responses

Login to post response