substring c# after character code example
Example 1: substring c# after character
var result = str.Substring(str.LastIndexOf('-') + 1);
Example 2: c# get certain character from string
string myString = "string";
// outputs r
print(mystring[2]);
Example 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