String Contains a string : String Contain : String C# Examples


C# Examples » String » String Contain »

 

String Contains a string









    
using  System;    
  
class  MainClass  {    
    public  static  void  Main()  {    
        string  str  =  "abcdefghijk";  
  
        if(str.Contains("def"))    
            Console.WriteLine("The  sequence  'def'  was  found.");  
  
    }    
}
    
   
  
   



Output

The sequence 'def' was found.


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» String Contain