M
mp
stepping through characters in a string (from contents of ascii text file)
i'm trying to detect the linebreaks
i tried
if (currentCharacter == '\n')
{
Log.WriteLine("end of line");
}
and
if (currentCharacter.ToString() == Environment.NewLine)
{
Log.WriteLine("end of line");
}
and
if (currentCharacter == '\r')
{
Log.WriteLine("end of line");
}
how can I detect a llinebreak when i'm reading each character in turn?
thanks
mark
i'm trying to detect the linebreaks
i tried
if (currentCharacter == '\n')
{
Log.WriteLine("end of line");
}
and
if (currentCharacter.ToString() == Environment.NewLine)
{
Log.WriteLine("end of line");
}
and
if (currentCharacter == '\r')
{
Log.WriteLine("end of line");
}
how can I detect a llinebreak when i'm reading each character in turn?
thanks
mark