Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
QuestionRe: Can i use GC.Collect() ? Pin
Martin#2-Apr-07 21:24
Martin#2-Apr-07 21:24 
AnswerRe: Can i use GC.Collect() ? Pin
Scott Dorman3-Apr-07 1:05
professionalScott Dorman3-Apr-07 1:05 
GeneralRe: Can i use GC.Collect() ? Pin
Martin#3-Apr-07 4:05
Martin#3-Apr-07 4:05 
GeneralRe: Can i use GC.Collect() ? Pin
Martin#2-Apr-07 20:28
Martin#2-Apr-07 20:28 
QuestionSetting 'OnClick' for dynamic button in Code behind Pin
Chris McGlothen2-Apr-07 11:59
Chris McGlothen2-Apr-07 11:59 
QuestionScheduling (user input time = system time Pin
orly00132-Apr-07 11:37
orly00132-Apr-07 11:37 
AnswerRe: Scheduling (user input time = system time Pin
Judah Gabriel Himango2-Apr-07 13:06
sponsorJudah Gabriel Himango2-Apr-07 13:06 
AnswerRe: Scheduling (user input time = system time Pin
Leslie Sanford2-Apr-07 16:40
Leslie Sanford2-Apr-07 16:40 
First, parse the user input time and convert it to a DateTime object (see Judah's post). Second, set up a timer to generate timing events. You'll need to decide how often you need "tick" events from the timer, i.e. how often you want to check to see if the time specified by the user has expired. Third, when you compare the user's time with the current time, make sure you use the "less than or equal to" operator:

if(userTime <= DateTime.Now)
{
    // Alert user...
  
    // Don't need the timer any more.
    timer.Stop();
}


If you use the equality operator instead, it's possible that the tick event generated by the timer will skip over the point in time in which the user's time is equal to the current time.

Hope this helps.

[EDIT] Oops, I original said to use the "greater than or equal to operator." It needs to be the "less than or equal to" operator given the way I've set up the comparison.
QuestionClosing ComboBox DropDownList Programmatically Pin
freshonlineMax2-Apr-07 10:49
freshonlineMax2-Apr-07 10:49 
AnswerRe: Closing ComboBox DropDownList Programmatically Pin
Judah Gabriel Himango2-Apr-07 13:04
sponsorJudah Gabriel Himango2-Apr-07 13:04 
QuestionShowDialogue Pin
AAKAra2-Apr-07 10:32
AAKAra2-Apr-07 10:32 
AnswerRe: ShowDialogue Pin
Christian Graus2-Apr-07 12:26
protectorChristian Graus2-Apr-07 12:26 
GeneralRe: ShowDialogue Pin
AAKAra3-Apr-07 7:05
AAKAra3-Apr-07 7:05 
GeneralRe: ShowDialogue Pin
AAKAra3-Apr-07 7:25
AAKAra3-Apr-07 7:25 
QuestionHow to get to DVD drive without getting access to CD drive? Pin
Khoramdin2-Apr-07 10:16
Khoramdin2-Apr-07 10:16 
Questioncomputer name to IP address Pin
marwan_siala2-Apr-07 9:52
marwan_siala2-Apr-07 9:52 
AnswerRe: computer name to IP address Pin
stancrm2-Apr-07 19:44
stancrm2-Apr-07 19:44 
QuestionOpening UNKNOWN filename? Pin
Goalie352-Apr-07 9:18
Goalie352-Apr-07 9:18 
AnswerRe: Opening UNKNOWN filename? Pin
Christian Graus2-Apr-07 10:01
protectorChristian Graus2-Apr-07 10:01 
AnswerRe: Opening UNKNOWN filename? Pin
engsrini2-Apr-07 13:20
engsrini2-Apr-07 13:20 
QuestionPulling info from arrays Pin
JMOdom2-Apr-07 8:57
JMOdom2-Apr-07 8:57 
AnswerRe: Pulling info from arrays [modified] Pin
Christian Graus2-Apr-07 10:11
protectorChristian Graus2-Apr-07 10:11 
QuestionHow to remove comment from XML string Pin
AndrusM2-Apr-07 8:05
AndrusM2-Apr-07 8:05 
AnswerRe: How to remove comment from XML string Pin
Not Active2-Apr-07 8:26
mentorNot Active2-Apr-07 8:26 
GeneralRe: How to remove comment from XML string Pin
AndrusM2-Apr-07 9:47
AndrusM2-Apr-07 9:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.