Thursday, July 01, 2004

VJs Tip Of The Day - July 1st 2004

Split Functions in .Net

There are multiple Split functions available in .NET...

U can use System.String.Split if you need to split a string based on a collection
of specific characters. Each individual character is its own delimiter. Here there are chances of getting white spaces when you would not expect them to come...

Use System.Text.RegularExpressions.RegEx.Split to split based on some specific formats... You can use this in case the earlier one does not work for you...

At the end if you remember the good old days you can reference the Microsoft.VisualBasic assembly in your program and can use the Strings.Split function to split a string based on a word... The favorite way of VB6 programmer... :-)

No comments: