This is my text file
john monday 500 sara monday 600 sunny monday 1200 john monday 500 sara monday 300 sunny monday 2200 john monday 400 sara monday 100 sunny monday 500 john monday 520 sara monday 600 sunny monday 10 john monday 990 sara monday 850 sunny monday 1000 john monday 300 sara monday 200 sunny monday
is there any way i can read data and save it in string which comes after the name of SARA for eg from the above text file i need only the numbers which comes after the name of SARA , SUBSTRING is not helping because i have to specify the location of numbers over there . Don't know how to deal with it , i've done google fo now like an hour or so
please don't laugh at my try :(
using (StreamReader readtext = new StreamReader("F:\\spokeo\\2.txt"))
{
string readMeText = readtext.ReadLine();
Console.WriteLine(readMeText);
int index1 = Convert.ToInt32(readMeText.IndexOf('SARA', 0));
Console.WriteLine("The Index Value of character 'SARA' " +
"with start index 0 is " + index1);
}