This is what I came up with so far
private void CheckFormatting()
{
StringReader objReaderf = new StringReader(txtInput.Text);
List<String> formatTextList = new List<String>();
do
{
formatTextList.Add(objReaderf.ReadLine());
}
while (objReaderf.Peek() != -1);
objReaderf.Close();
for (int i = 0; i < formatTextList.Count; i++)
{
}
}
That it is intended is to verify that the user has entered their information in this format Gxx: xx: xx: xx JGxx, where "x" can be any integer.
As you can see, the user enters his data into a multi-line text field. Then I take this data and enter it into the list. the next part is where I am stuck. I am creating a for loop to go through the list line by line, but I think I will also need to go through each character of the line by character. How should I do it? or is there a faster way to do this?
early
source
share