A scenario where the variable tempMID of type string containing value "338715618884", checks if it contains "" or not. It is returning true. Why is this happening? in my understanding, this shouldn't return true.
That's documented:
String.Contains
returnstrue
if the value parameter occurs within this string, or if value is the empty string (""); otherwise,false
.
So it's working as expected. The language designer have decided that an empty string is contained in every existing string, which makes sense to me.