Click here to Skip to main content
15,798,200 members
Home / Discussions / C#
   

C#

 
AnswerRe: Power management hybernation is causing my application to hang ... Pin
turbosupramk326-Jul-13 4:47
turbosupramk326-Jul-13 4:47 
Questionusing System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
BillWoodruff25-Jul-13 1:55
professionalBillWoodruff25-Jul-13 1:55 
AnswerRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
Dave Kreskowiak25-Jul-13 2:15
mveDave Kreskowiak25-Jul-13 2:15 
GeneralRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
BillWoodruff25-Jul-13 22:48
professionalBillWoodruff25-Jul-13 22:48 
GeneralRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
Dave Kreskowiak26-Jul-13 8:00
mveDave Kreskowiak26-Jul-13 8:00 
GeneralRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
BillWoodruff30-Jul-13 5:57
professionalBillWoodruff30-Jul-13 5:57 
GeneralRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
Dave Kreskowiak30-Jul-13 6:46
mveDave Kreskowiak30-Jul-13 6:46 
AnswerRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case PinPopular
Alan N25-Jul-13 5:27
Alan N25-Jul-13 5:27 
Ooh, that's difficult to spot. The mistake is subtle, easy to make and I'm sure I've done the same thing.

Stopwatch.Elapsed is a TimeSpan and TimeSpan.Milliseconds is just the millisecond component. If the measured value is less than 1 second then the result will be correct but either Stopwatch.Elapsed.TotalMilliseconds or Stopwatch.ElapsedMilliseconds would be what you really wanted.

Alan.
GeneralRe: using System.Diagnostics.Stopwatch in an Button_Click Event: unusual results in specific test case Pin
BillWoodruff25-Jul-13 22:13
professionalBillWoodruff25-Jul-13 22:13 
QuestionParamerterized OleDB Query Pin
gautamn199025-Jul-13 1:21
gautamn199025-Jul-13 1:21 
AnswerRe: Paramerterized OleDB Query Pin
Dave Kreskowiak25-Jul-13 2:17
mveDave Kreskowiak25-Jul-13 2:17 
GeneralRe: Paramerterized OleDB Query Pin
gautamn199025-Jul-13 20:28
gautamn199025-Jul-13 20:28 
GeneralRe: Paramerterized OleDB Query Pin
Dave Kreskowiak26-Jul-13 3:52
mveDave Kreskowiak26-Jul-13 3:52 
GeneralRe: Paramerterized OleDB Query Pin
gautamn199028-Jul-13 20:03
gautamn199028-Jul-13 20:03 
AnswerRe: Paramerterized OleDB Query Pin
PIEBALDconsult25-Jul-13 15:19
professionalPIEBALDconsult25-Jul-13 15:19 
GeneralRe: Paramerterized OleDB Query Pin
gautamn199025-Jul-13 20:45
gautamn199025-Jul-13 20:45 
GeneralRe: Paramerterized OleDB Query Pin
PIEBALDconsult26-Jul-13 8:58
professionalPIEBALDconsult26-Jul-13 8:58 
QuestionDataGridview ComboBox Filter Pin
Awais Jan25-Jul-13 0:44
Awais Jan25-Jul-13 0:44 
Questionproblem with datagridview in windows application Pin
Arun kumar Gautam24-Jul-13 21:59
Arun kumar Gautam24-Jul-13 21:59 
QuestionRe: problem with datagridview in windows application Pin
Eddy Vluggen25-Jul-13 8:12
professionalEddy Vluggen25-Jul-13 8:12 
AnswerRe: problem with datagridview in windows application Pin
Arun kumar Gautam25-Jul-13 20:32
Arun kumar Gautam25-Jul-13 20:32 
AnswerRe: problem with datagridview in windows application Pin
Eddy Vluggen26-Jul-13 9:05
professionalEddy Vluggen26-Jul-13 9:05 
Questionsingle sogn on using active directory Pin
ketan italiya24-Jul-13 21:42
ketan italiya24-Jul-13 21:42 
AnswerRe: single sogn on using active directory Pin
Eddy Vluggen25-Jul-13 8:08
professionalEddy Vluggen25-Jul-13 8:08 
GeneralRe: single sogn on using active directory Pin
ketan italiya25-Jul-13 23:48
ketan italiya25-Jul-13 23:48 

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.