String manipulation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Microsoft.VisualBasic.Strings.InStr() and
Microsoft.VisualBasic.Strings.Mid() to manipulate strings.

Is there a better way ? i.e. by using the framework.

Thanks,
Craig
 
Is there a better way ? i.e. by using the framework.

I'm not saying they are better, but you can use the String.IndexOf and
String.Substring methods.



Mattias
 
Craig HB said:
I am using Microsoft.VisualBasic.Strings.InStr() and
Microsoft.VisualBasic.Strings.Mid() to manipulate strings.

Is there a better way ? i.e. by using the framework.

Yes - using the methods of the String class will make your code far
more idiomatically .NET, rather than looking more like classic VB. You
*may* gain some performance, but more importantly your code will be
more readable to people from other .NET languages.
 
Back
Top