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# using linq on file name
Jan 17 2013 1:20 AM
In a C# 2008 desktop application, I can using the following statement to select error reports that are displayed on excel spreadsheets:
string[] excelFiles = Directory.GetFiles(strFullpath, "*ErrorReport.xlsx")
.Select(path => Path.GetFileName(path))
.ToArray();
Due to the above, I have the following questions:
1. if I want to change the statement to select either "*bErrorReport.xlsx" or "*dErrorReport.xlsx" or "*ErrorReport.xlsx",
how would I change the statement I just displayed?
2. The above statement picks 3 excel spreadsheets and there are really only two excel spreadsheets. The excelspreadshets that are valid
include:
customer_number_bErrorReport.xlsx,
and customer_number_ErrorReport.xlsx.
The invalid value that is selected is
~customer_number_bErrorReport.xlsx.
Can you show me the code, so an invalid spreadsheet called ~customer_number_bErrorReport.xlsx is not selected?
Reply
Answers (
1
)
recursive read lock acquisitions not allowed in this mode c#
Chat Application.