TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
viktors
NA
54
0
how to search for string
Aug 31 2004 3:10 PM
i have a string of this kind.. string myFile1= @"C:\Documents and Settings\Desktop\ExcelSheets\2004abc.xls"; i want to get the 2004abc.xls..how can this be acheived? i have been able to split the string and get individual values ..but how do i get the last one..2004abc.xls from this.. string[] arInfo = new string[6]; // define which character is seperating fields string splitter = "\\"; char csplitter = Convert.ToChar(splitter); arInfo = myFile1.Split(csplitter); for(int x = 0; x < arInfo.Length; x++) { Response.Write(arInfo[x] + "
"); }
Reply
Answers (
2
)
Integrating C # into a C++ Project
ASP.Net with C# and SQL server db form