Results for “C#”
Small, practical examples. Search by task or narrow things down below.
Detect an invalid Date object
JavaScript: An invalid Date has a NaN time value.
JavaScript✓ Tested
Detect an invalid Date object
TypeScript: An invalid Date has a NaN time value.
TypeScript✓ Tested
Detect integer addition overflow
Java: Math.addExact throws rather than silently wrapping on overflow.
Java✓ Tested
Detect integer overflow with checked
C#: A checked arithmetic block throws instead of silently wrapping an integer result.
C#✓ Tested
Detect invalid UTF-8 data
Detect invalid UTF-8 data in a complete Rust program using the standard library.
Rust✓ Tested
Detect NaN without converting the input
JavaScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
JavaScript✓ Tested
Detect NaN without converting the input
TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
TypeScript✓ Tested
Detect truncated formatted output
Arduino / C: snprintf returns the length it would have written, excluding the null terminator.
Arduino / C✓ Tested
Disable a control through its model
Disable a control through its model with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Disable a related group of controls
HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.
HTML✓ Tested
Disable a service’s network interfaces
Docker / Compose: network_mode none leaves only the loopback interface.
Docker / Compose✓ Tested
Disable an action while it is pending
Disable an action while it is pending with a small React component and explicit browser behavior.
React✓ Tested