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# check for directory file path name
May 23 2013 4:32 PM
In a C# 2008 desktop application, I would like to come up with a test to see if the value 'CUST' is a valid directory level within a directory path supplied to the program. Basically the directory path would look like:
"C:\RData\CUST\Omaha\book.xlsx".
The code I am using the following code, but it is not working:
string filesaveLocation=ConfigurationSettings.AppSettings["Location"];
if (filesaveLocation == "*CUST*").
The value for filesaveLocation is obtained from the app.config file.
Thus can you show me how to change the code listed above, so that I can verify that 'CUST' is one of the directory folder names listed in a file path that looks like "C:\RData\CUST\Omaha\book.xlsx"?
Reply
Answers (
4
)
How do I reverse an Enail Address in C#?
is there a memory limit for the dispatcher