Results for “try”
Small, practical examples. Search by task or narrow things down below.
Override context in a nested section
Override context in a nested section with a small React component and explicit browser behavior.
React✓ Tested
Parse a GUID without an exception
C#: TryParse reports malformed values with a boolean return.
C#✓ Tested
Parse an enum name without throwing
C#: Combine TryParse and IsDefined when only named declared values should be accepted.
C#✓ Tested
Pass an input ref as a React 19 prop
Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.
React✓ Tested
Pass an object to the style prop
Pass an object to the style prop with a small React component and explicit browser behavior.
React✓ Tested
Pass data through props
Pass data through props with a small React component and explicit browser behavior.
React✓ Tested
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested
Preserve item state while reordering by key
Preserve item state while reordering by key with a small React component and explicit browser behavior.
React✓ Tested
Provide read-only application configuration
Provide read-only application configuration with a small React component and explicit browser behavior.
React✓ Tested
Read a data attribute from the current target
Read a data attribute from the current target with a small React component and explicit browser behavior.
React✓ Tested
Read a value from context
Read a value from context with a small React component and explicit browser behavior.
React✓ Tested
Read an optional JSON property safely
C#: Use TryGetProperty instead of throwing when an optional property is absent.
C#✓ Tested