You can do without looping also..
if it helpful, you can use this.
using System;
using System.Linq;
namespace oops1
{
class Program
{
static void Main(string[] args)
{
string input = "A 0 B 1 C 0" + "\n" +
"One: 1" + "\n" +
" A 0 B 2 C 1" + "\n" +
"Two: 2" + "\n" +
"A 0 B 3 C 2" + "\n" +
"Three: 3";
string output = GetText(input, 0, 1, 0);
Console.WriteLine(output);
Console.ReadLine();
}
public static string GetText(string input, int a, int b, int c)
{
string format = "A {0} B {1} C {2}";
var array = input.Split('\n').ToList();
int index = array.IndexOf(string.Format(format, a, b, c)) + 1;
return array[index];
}
}
}