From c6c99a2b176adf4e72ca14ec10f207ef49d27c4c Mon Sep 17 00:00:00 2001 From: brendansensus Date: Fri, 10 Jan 2020 10:16:25 -0700 Subject: [PATCH 1/3] The documentation is wrong for Timer.Change method The documentation for the following overload of Timer.Change is incorrect: public bool Change (long dueTime, long period); If you use a value for the dueTime parameter that is greater than 4294967294, the method throws an ArgumentOutOfRangeException, not a NotSupportedException as the documentation claims. I'm not sure which exception is thrown if the period parameter is greater than 4294967294. I didn't test that. You might want to check and verify. You should make it clear in the parameter description that values over 4294967294 are not valid. We ran into this problem and it took a little while to debug because the documentation was not clear and plain wrong. Thank you! --- xml/System.Threading/Timer.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index a4cf6f3e451..43e18e5f361 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -594,7 +594,7 @@ Sub TimerCallback(state As Object) - The amount of time to delay before the invoking the callback method specified when the was constructed, in milliseconds. Specify to prevent the timer from restarting. Specify zero (0) to restart the timer immediately. + The amount of time to delay before the invoking the callback method specified when the was constructed, in milliseconds. Specify to prevent the timer from restarting. Specify zero (0) to restart the timer immediately. This value must be less than or equal to 4294967294. The time interval between invocations of the callback method specified when the was constructed, in milliseconds. Specify to disable periodic signaling. Changes the start time and the interval between method invocations for a timer, using 64-bit signed integers to measure time intervals. @@ -614,8 +614,8 @@ Sub TimerCallback(state As Object) ]]> The has already been disposed. - The or parameter is less than -1. - The or parameter is greater than 4294967294. + The or parameter is less than -1 or is greater than 4294967294. + The parameter is greater than 4294967294. Timers From b293e061ea45055c9aaa59c3bf7e11f240ba07f6 Mon Sep 17 00:00:00 2001 From: brendansensus Date: Wed, 29 Jan 2020 13:45:02 -0700 Subject: [PATCH 2/3] Update xml/System.Threading/Timer.xml Co-Authored-By: Maira Wenzel --- xml/System.Threading/Timer.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index 43e18e5f361..be37e591de8 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -615,7 +615,6 @@ Sub TimerCallback(state As Object) The has already been disposed. The or parameter is less than -1 or is greater than 4294967294. - The parameter is greater than 4294967294. Timers From e738b2f68d96ecfd430f41ed176a67b8cce29cc9 Mon Sep 17 00:00:00 2001 From: brendansensus Date: Wed, 29 Jan 2020 13:45:17 -0700 Subject: [PATCH 3/3] Update xml/System.Threading/Timer.xml Co-Authored-By: Maira Wenzel --- xml/System.Threading/Timer.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index be37e591de8..36b95fa9c27 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -614,7 +614,11 @@ Sub TimerCallback(state As Object) ]]> The has already been disposed. - The or parameter is less than -1 or is greater than 4294967294. + or is less than -1. + +-or- + + or is greater than 4294967294. Timers