I am using Directory.GetFile() method to give me the list of all .txt files in my application path. Unfortunately it returns something like "C:/Document and setting/etc../lol.txt", the whole directory path with the file name and I cant display that on the listbox on my page. So, I thought I would make a For Loop that goes through each character in the string starting from right until it reaches...
Thanks a lot pufa.
1 More questions though :P
Is theres some sort of a website which has Net library explained and sorted under categories..? I mean, it would have been impossible to discover GetFileName() method by myself if you didn't introduce me to it, Moreover, to find methods in C# that formats/edits plain strings.
Quote:
Originally Posted by andrestander
Is theres some sort of a website which has Net library explained and sorted under categories..? I mean, it would have been impossible to discover GetFileName() method by myself if you didn't introduce me to it, Moreover, to find methods in C# that formats/edits plain strings....
Quote:
Originally Posted by andrestander
Moreover, to find methods in C# that formats/edits plain strings.
string.Format("{0} {1}", 0 ,1);
http://john-sheehan.com/blog/wp-cont...ng-strings. pdf
The namespaces are fairly well organised. Start from the MSDN class library ( http://msdn.microsoft.com/en-au/library/ms229335.a spx ) and just explore when the need arises.
For text formatting & manipulation, you would probably notice the System.Text namespace. Also, since what you're formatting is a path, the System.IO namespace has a Path class.
Cheers,
D.
Quote: Originally Posted by andrestander Moreover, to find methods in C# that formats/edits plain strings. string.Format("{0} {1}", 0 ,1); http://john-sheehan.com/blog/wp-cont...ng-strings.pdf
The namespaces are fairly well organised. Start from the MSDN class library ( http://msdn.microsoft.com/en-au/library/ms229335.aspx ) and just explore when the need arises. For text formatting & manipulation, you would probably notice the System.Text namespace. Also, since what you're formatting is a path, the System.IO namespace has a Path class. Cheers, D.
Thread profile page for "Editing strings in C#" on http://www.sitepointforums.com.
This report page is a snippet summary view from a single thread "Editing strings in C#", located on the Message Board at http://www.sitepointforums.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity