Using int for timeout and delay parameters causes bugs because developers must guess the time units (seconds vs milliseconds). Two solutions prevent this: explicitly include units in parameter names (delayMilliseconds, timeoutSeconds) or use TimeSpan type which makes units clear at assignment. TimeSpan provides type safety and

4m read timeFrom ardalis.com
Post cover image
Table of contents
Fixing Missing Units in Timeout and Delay Parameters and PropertiesSummary

Sort: