Click here to Skip to main content
16,005,222 members
Home / Discussions / C#
   

C#

 
GeneralRe: SoundPlayer Pin
Kristian Sixhøj25-Nov-07 9:42
Kristian Sixhøj25-Nov-07 9:42 
GeneralRe: SoundPlayer Pin
MasterSharp25-Nov-07 9:47
MasterSharp25-Nov-07 9:47 
QuestionRequest made to the server from Web Browser Control? Pin
Khoramdin25-Nov-07 7:04
Khoramdin25-Nov-07 7:04 
QuestionCheck if x minutes has passed Pin
Kristian Sixhøj25-Nov-07 4:27
Kristian Sixhøj25-Nov-07 4:27 
AnswerRe: Check if x minutes has passed [modified] Pin
Ravi Bhavnani25-Nov-07 5:09
professionalRavi Bhavnani25-Nov-07 5:09 
GeneralRe: Check if x minutes has passed Pin
Kristian Sixhøj25-Nov-07 5:20
Kristian Sixhøj25-Nov-07 5:20 
GeneralRe: Check if x minutes has passed Pin
Paul Conrad25-Nov-07 6:56
professionalPaul Conrad25-Nov-07 6:56 
GeneralRe: Check if x minutes has passed Pin
Anthony Mushrow25-Nov-07 7:02
professionalAnthony Mushrow25-Nov-07 7:02 
Replace tmNow with DateTime.Now...

And people are here to help, not to do the work for you. I shall explain how the above method works, so that you can use it / write up your own.

It gets the current time using DateTime.Now and stores it, and the next time the method is called it compares this with the new current time through use of a TimeSpan, wich is quite self explanatory. So the time since the method was last called is DateTime.Now - thatOtherTimeFromBefore

It then compares the minutes property of the TimeSpan, to the int you provided to the method (which is the number of minutes you want to check have passed). Thats pretty much just an if statement.

It then returns true if the minutes property is greater than, or equal to, your int; and false if it is not.

----

And if i am mistaken, i apologise. I'm leaving now...



My current favourite word is: PIE!

Good ol' pie, it's been a while.

AnswerRe: Check if x minutes has passed Pin
Ravi Bhavnani25-Nov-07 7:02
professionalRavi Bhavnani25-Nov-07 7:02 
GeneralRe: Check if x minutes has passed Pin
Kristian Sixhøj25-Nov-07 7:12
Kristian Sixhøj25-Nov-07 7:12 
AnswerRe: Check if x minutes has passed Pin
Ravi Bhavnani25-Nov-07 7:20
professionalRavi Bhavnani25-Nov-07 7:20 
GeneralRe: Check if x minutes has passed Pin
Kristian Sixhøj25-Nov-07 7:24
Kristian Sixhøj25-Nov-07 7:24 
GeneralRe: Check if x minutes has passed Pin
Kristian Sixhøj25-Nov-07 7:48
Kristian Sixhøj25-Nov-07 7:48 
GeneralRe: Check if x minutes has passed Pin
Ravi Bhavnani25-Nov-07 7:50
professionalRavi Bhavnani25-Nov-07 7:50 
QuestionMore DirectSound Pin
MasterSharp25-Nov-07 4:14
MasterSharp25-Nov-07 4:14 
AnswerRe: More DirectSound Pin
martin_hughes25-Nov-07 4:35
martin_hughes25-Nov-07 4:35 
GeneralRe: More DirectSound [modified] Pin
MasterSharp25-Nov-07 5:23
MasterSharp25-Nov-07 5:23 
QuestionLock a directory Pin
mahdiehIR25-Nov-07 3:47
mahdiehIR25-Nov-07 3:47 
AnswerRe: Lock a directory Pin
Guffa25-Nov-07 3:52
Guffa25-Nov-07 3:52 
GeneralRe: Lock a directory Pin
Paul Conrad25-Nov-07 11:09
professionalPaul Conrad25-Nov-07 11:09 
JokeRe: Lock a directory Pin
mav.northwind25-Nov-07 20:22
mav.northwind25-Nov-07 20:22 
QuestionSystem.Window.Forms.LinkView TO System.Window.Forms.Listbox Pin
sweet corn25-Nov-07 3:24
sweet corn25-Nov-07 3:24 
AnswerRe: System.Window.Forms.LinkView TO System.Window.Forms.Listbox Pin
Ravi Bhavnani25-Nov-07 5:10
professionalRavi Bhavnani25-Nov-07 5:10 
GeneralRe: System.Window.Forms.LinkView TO System.Window.Forms.Listbox Pin
sweet corn29-Nov-07 4:44
sweet corn29-Nov-07 4:44 
QuestionGET URL from Firefox Pin
kepp25-Nov-07 3:20
kepp25-Nov-07 3:20 

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.