c# get number of characters in a string code example
Example 1: string length c#
string name = "Anthony";
int nameLength = name.Length;
Console.WriteLine("The name " + name + " contains " + nameLength + "letters.");
Example 2: find character from string c# count
int count = Regex.Matches(test, "word").Count;