I have a file with some text content. e.g. file name = RandomText.txt
string content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit";
I want to be able to extract content given specific indexes e.g. get text from index 5 to index 10
which should return "ipsum"
Here are my attempt, which isnt doing exctly what i want..
int minRange = 1
int maxRange = 10;
int randomIndex = rnd.Next(minRange, maxRange);
string text = File.ReadLines(RandomText.txt).Skip(randomIndex).First();
(I think skip() in here used for lines rather than indexes, which isnt what i want really..)
any ideas?