Answers for "c# check contains string"

C#
3

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
9

c# string contains

bool b = s1.Contains("myString");
Posted by: Guest on May-26-2020

Code answers related to "c# check contains string"

C# Answers by Framework

Browse Popular Code Answers by Language