Results for “C#”
Small, practical examples. Search by task or narrow things down below.
Repeat a fixed number of times
JavaScript: Use a counted loop to print three numbered steps.
JavaScript✓ Tested
Repeat a fixed number of times
TypeScript: Use a counted loop to print three numbered steps.
TypeScript✓ Tested
Repeat a fixed number of times
C++: Use a counted loop to print three numbered steps.
C++✓ Tested
Repeat a fixed number of times
C: Use a counted loop to print three numbered steps.
C✓ Tested
Repeat a serial message three times
Arduino / C: Repeat a serial message three times on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Repeat a string a fixed number of times
JavaScript: String.repeat requires a nonnegative finite repetition count.
JavaScript✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested
Represent a small set of named states
C: An enum gives symbolic names to integer state values.
C✓ Tested
Represent an absent result with optional
C++: value_or supplies a default without requiring a sentinel inside the value domain.
C++✓ Tested
Represent an enabled state
Arduino / C: Represent an enabled state on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested