Friday, 9 August 2013

String Methods Retrieving a Particular Information [on hold]

String Methods Retrieving a Particular Information [on hold]

I got the following information in my text file.
Names Age
Sara 29
Tara 39
Lara 19
Jara 59
Hara 19
Gora 22
Mora 19
Bora 89
Rara 19



I want to know whether, there is any method in String or any other related
methods to give me this outcome.



Console.WriteLine("Enter The Age");
string age = Console.ReadLine();



Age entered is 19. All the names associated with this age is retrieved and
displayed. The output looks like this:



Names Age
Lara 19
Hara 19
Mora 19
Rara 19



To make this happen can anyone give me suggestions? I am not allowed to
use linq, jagged arrays, exception, List etc.

No comments:

Post a Comment