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
shreyas adikumar
NA
53
5.1k
coming out of loop even after time is matching in asp.net
Oct 1 2018 2:10 AM
hi it is not matching the given time with present time it is coming outside the loop even after matching time also it is giving false even when the time is matching can u please suggest me where i am going wrong.
string minute = "15";
string minute2 = "20";
string minute3 = "27";
string minute4 = "02";
TimeSpan first = TimeSpan.Parse(minute);
TimeSpan second = TimeSpan.Parse(minute2);
TimeSpan Third = TimeSpan.Parse(minute3);
TimeSpan fourth = TimeSpan.Parse(minute4);
TimeSpan now = DateTime.Now.TimeOfDay;
if (now == first|| now == second || now == Third || now == fourth)
{
//matched
}
else
{
}
}
Reply
Answers (
3
)
Business Intelligence tools
asp.net how to create discussion forum in asp.net C#