FIND YOUR NEXT FEW LINES

Results for “enum”

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

23 snippets foundClear filters
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
C#File operations & paths

Enumerate matching files recursively

C#: Sort relative filenames when reproducible traversal output is required.

C#✓ Tested
C#JSON & binary formats

Enumerate the items of a JSON array

C#: Dispose JsonDocument after reading its elements.

C#✓ Tested
C#Text validation & encoding

Enumerate Unicode code points

C#: EnumerateRunes combines surrogate pairs into Unicode scalar values.

C#✓ Tested
JavaScriptObject behavior & collections

List an object’s own enumerable keys

JavaScript: Object.keys omits inherited and non-enumerable properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

List an object’s own enumerable keys

TypeScript: Object.keys omits inherited and non-enumerable properties.

TypeScript✓ Tested
RustGetting Started

Match enum variants

Match enum variants in a complete Rust program using the standard library.

Rust✓ 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
JavaScriptObject behavior & collections

Read an object’s own enumerable values

JavaScript: Object.values provides values without their corresponding keys.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Read an object’s own enumerable values

TypeScript: Object.values provides values without their corresponding keys.

TypeScript✓ Tested
RustFunctions & data types

Store data in an enum variant

Store data in an enum variant in a complete Rust program using the standard library.

Rust✓ Tested
PythonIteration & sequences

Number items while iterating

Python: Use enumerate to attach a one-based position without maintaining a separate counter.

Python✓ Tested