Use '@'
at the beginning of your string if you are searching for exactly two slash
if (fileNameArrayEdited.StartsWith(@"\\"))
{
specifiedDirCount = specifiedDirCount + 1;
}
They are called verbatim strings and they are ignoring escape characters.For better explanation you can take a look at here: http://msdn.microsoft.com/en-us/library/362314fe.aspx
But I suspect in here your one slash is escape character
"\\windows"
So you must search for one slash like this:
if (fileNameArrayEdited.StartsWith(@"\"))
{
specifiedDirCount = specifiedDirCount + 1;
}