My assignment in Visual Basic 2010 is to build a order form that has two text boxes, one for the name and the other for the address.
And we\'re suppose to use the <
Since this is a homework question, I will answer with a question or several:
IndexOf
again.You'd typically use IndexOf
to -
See if a string contained something
If someString.IndexOf("Avenue") > - 1 Then
'do something
End If
Get the start position of a value in a string , this could then be used to extract part of the string. e.g. someString.Substring(someString.IndexOf("@"),10)
would get then next ten characters starting from where the "@" character was found in your string.
Bear in mind you'll always need to handle scenarios where IndexOf
will return -1 if it does not find the string your searching for, so your code will have to handle that eventuality.