unlimited/open string
-
Hey, I'm a beginner with vb.net. i want to apply a chunk of code to a string only if the string has the text "B800_" in it, so i used an if statement: If sNewName = "B800_" Then blahblahblah End If My problem is, i need any string that include "B800_" not equals it, so i need it to apply to strings like "B800_this" or "B800_12345" Is there a way to make this happen? If there is a way to create an open string, or maybe something that checks if sNewName includes "B800_" then i could do something like If sNewName Includes "B800_" Then or If sNewName = "B800_" & "anything" Then Thanks for the help guys!
-
Hey, I'm a beginner with vb.net. i want to apply a chunk of code to a string only if the string has the text "B800_" in it, so i used an if statement: If sNewName = "B800_" Then blahblahblah End If My problem is, i need any string that include "B800_" not equals it, so i need it to apply to strings like "B800_this" or "B800_12345" Is there a way to make this happen? If there is a way to create an open string, or maybe something that checks if sNewName includes "B800_" then i could do something like If sNewName Includes "B800_" Then or If sNewName = "B800_" & "anything" Then Thanks for the help guys!
I would look at the IndexOf method from the String class.