How to count the number of backslashes in a string?
I've tried the following, but none of them worked.
string s = @"\a\a\n\u\u0013((((\a\b\n"; // output must be 8
int count = s.Count(a => a == "\\"); // Operator == cant be applied of type char & string
int count = s.Count(a => a == "\"); // newline in constant
int count = s.Split('\\').Length // it doesnt count