Answers for "c# find a string in a string"

C#
3

how to look for substring in string in c#

String phrase = "this is the ultimate string";

Console.WriteLine(phrase.Contains("this")); //returns True
Console.WriteLine(phrase.Contains("python")); //returns False
Posted by: Guest on April-29-2020
1

c# find substring in string

string fullName = "John Doe";
bool nameInFullName = fullName.Contains("John");
// nameInFullName is true
Posted by: Guest on September-18-2020
5

letter at index of string c#

string s = "hello";
char c = s[1];
// now c == 'e'
Posted by: Guest on July-01-2020

C# Answers by Framework

Browse Popular Code Answers by Language