Number of occurrences of a character in a string [duplicate] January 4, 2023 by Tarik You could do this: int count = test.Split('&').Length - 1; Or with LINQ: test.Count(x => x == '&');