## sdhawan -2

Hi Guys ,
I have a line which is like this :-
"C:\\Users\\saurabh\\Desktop\\Projects\\Texts\\A Sign of the Times.txt"
how can i jus extract the last part of it which is
A Sign of the Times.

Thanks

## finito 46

Here pseudo code

``````Do streamreader untill null
{
}

## sdhawan -2

this is to reaqd the line.what i want to do is to get a substring froma sting.so if suppose i have string like C:\\Users\\saurabh\\Desktop\\Projects\\Texts\\A Sign of the Times.txt then i just want "A Sign of the Times" part of the string.Thanks for the help

## sdhawan -2

I got it guys .This is what i was suppose to do

``````int coll = names[currentFile].LastIndexOf(@"\");
string sub = names[currentFile].Substring(coll + 1);
int coll2 = sub.LastIndexOf(@".");
string sub2 = sub.Remove(coll2);
item.article = sub2;``````

## finito 46

O sorry I see what happened.