Answers for "string contains check c#"

C#
2

how to cjeck if a string has a word c#

using System;

public class Demo {
   public static void Main() {
      string s = "Together we can do so much!";
      if (s.Contains("much") == true) {
         Console.WriteLine("Word found!");
      } else {
         Console.WriteLine("Word not found!");
      }
   }
}
Posted by: Guest on May-08-2020
2

c# string contains

var str = "a string to search in";
bool isIn = str.Contains("a string");
Posted by: Guest on January-04-2021
0

check if string is in string

Using System.Linq;


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

Code answers related to "string contains check c#"

C# Answers by Framework

Browse Popular Code Answers by Language