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
Sandeep Singh Shekhawat
NA
19.9k
30.1m
How can get Previous item in list using foreach loop?
Apr 26 2013 4:59 AM
I have a list
var _PublicHoliday = _db.tbl_HolidayMasters.Where(x => x.IsDelete == false).ToList();
and i am geting each item using foreach loop
foreach (var objPublicHoliday in _PublicHoliday)
{
if ((Convert.ToDateTime(DateTo.Text).AddDays(1)).Equals(objPublicHoliday.HolidayDate))
{
todate = Convert.ToDateTime(todate).AddDays(1).Date.ToShortDateString();
flagHoliday = 1;
}
}
Whenever I moved next holiday date the how can get previous holiday date in list?
Thanks
Reply
Answers (
2
)
C program with strings
Creating adjacency matrix