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
dc
NA
663
0
C# indexof problem
Oct 8 2012 6:13 PM
In a C# 2008 application, I am trying trying to obtain data about a file based upon the directory file where a file is located under. Basically I am trying to obtain a company name. The directory folder name is "Company Name(Company Number)". I would be do a substring to obtain the company name.
I have code like the following:
int intSTartNameloc = strFilename.IndexOf("(");
string strCompanyName = strFilename.substring(0,intSTartNameloc);
My problem is the intSTartNameloc is not picking up the real position of the left parantheseis. Thus can you tell me how to
change the line "int intSTartNameloc = strFilename.IndexOf("(");" so it selects the correct position?
Reply
Answers (
1
)
locate certain files in a directory structure
PDF Binary (ASP.Net using C#.Net)