Answers for "check if a character is in a string c#"

C#
0

c# check characters in string

errorCounter = Regex.Matches(yourstring,@"[a-zA-Z]").Count;
Posted by: Guest on March-04-2021
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
-1

c# check characters in string

//true if it doesn't contain letters
bool result = hello.Any(x => !char.IsLetter(x));
Posted by: Guest on March-04-2021

Code answers related to "check if a character is in a string c#"

C# Answers by Framework

Browse Popular Code Answers by Language