K
kenoyer130
..indexOf
..lastIndexOf
etc.
..lastIndexOf
etc.
In VB.NET there is a simple function to tell if one string
is contained inside another. For example:
dim mytxt as string = "abcdef"
dim i as integer
i = InStr(mytxt,"c") // will return zero if the
// character "#" is not in the string mytext
or
// 3 - the position of the chracter in
// this case.
Fred Nelson said:In VB.NET there is a simple function to tell if one string is contained
inside another. For example:
dim mytxt as string = "abcdef"
dim i as integer
i = InStr(mytxt,"c") // will return zero if the character "#" is not
in the string mytext or
// 3 - the position of the chracter in
this case.
I can't find a C# equivalent! (And I know it's there somewhere!)