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
Neerav Sachdeva
NA
33
81.4k
.NET C# application
Nov 25 2010 7:12 AM
I want to run athread at a particular time.I am passing one date and i am comparing it by system date .I want that
if it matches with systam date then my thread dhould thred but it is not doing so can anyone help me on that:-
Here is my sample code
public
static
void
Main()
{
DateTime
date1 =
new
DateTime
(2010, 11, 25, 12, 50, 0);
DateTime
date2 =
new
DateTime
(2010,11, 24, 19, 23, 0);
//DateTime current = DateTime.Now;
string
relationship;
while
(
true
)
{
//DateTime
current =
DateTime
.Now;
int
result =
DateTime
.Compare( date1,
DateTime
.Now
);
if
(result < 0)
relationship =
"is earlier than"
;
else
if
(result == 0)
{
relationship =
"is the same time as"
;
//here i want to start my thread
break
;
}
else
relationship =
"is later than"
;
}
Console
.WriteLine(
"equal time "
);
//here it is not showing this result
Console
.ReadLine();
}
Reply
Answers (
1
)
How to send SMS in asp.net?
project topic