Answers for "c# string is contained within"

Lua
0

check if string is in string

Using System.Linq;


if(stringArray.All(stringToCheck.Contains)){
	//Process
}
Posted by: Guest on January-01-1970
0

check if string is in string

string stringToCheck = "text1";
string[] stringArray = { "text1", "testtest", "test1test2", "test2text1" };
foreach (string x in stringArray)
{
    if (x == stringToCheck)
    {
        // Process...
    }
}
Posted by: Guest on January-01-1970

Code answers related to "c# string is contained within"

Browse Popular Code Answers by Language