FIND YOUR NEXT FEW LINES

Results for “control”

Small, practical examples. Search by task or narrow things down below.

112 snippets foundClear filters
AngularLists & control flow

Bind a narrowed value using an @if alias

Bind a narrowed value using an @if alias with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Types & reliable control flow

Create a modified copy of an immutable record

C#: A with expression creates a shallow copy with selected changed properties.

C#✓ Tested
JavaRecords & reliable control flow

Define an immutable data record

Java: A local record gives a small Java data carrier named accessors and value semantics.

Java✓ Tested
AngularLists & control flow

Expose the current index in @for

Expose the current index in @for with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLists & control flow

Filter a signal-backed list

Filter a signal-backed list with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Types & reliable control flow

Narrow an object using a type pattern

C#: A successful is pattern introduces a strongly typed local variable.

C#✓ Tested
JavaRecords & reliable control flow

Narrow an object with a pattern variable

Java: Pattern matching avoids a separate cast after a successful instanceof check.

Java✓ Tested
AngularLists & control flow

Page through a collection

Page through a collection with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Types & reliable control flow

Parse an enum name without throwing

C#: Combine TryParse and IsDefined when only named declared values should be accepted.

C#✓ Tested
C#Types & reliable control flow

Pass behavior as a function delegate

C#: Func describes a callable with typed parameters and a return value.

C#✓ Tested
jQueryEvent control

Pass values through a custom event

jQuery: trigger passes its extra argument array after the event object.

jQuery✓ Tested
C#Types & reliable control flow

Perform cleanup even after an exception

C#: A finally block runs after a handled failure as well as after success.

C#✓ Tested