FIND YOUR NEXT FEW LINES

Results for “dot”

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

131 snippets foundClear filters
C#Data & dates

Serialize an object to JSON

Serialize a small anonymous C# object with System.Text.Json.

C#✓ Tested
C#Collections

Sort values with LINQ

Create an ascending sequence from C# integer values.

C#✓ Tested
C#Strings

Split and trim values

Split simple comma-separated C# text and trim each value.

C#✓ Tested
C#LINQ transformations

Split values into fixed-size chunks

C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.

C#✓ Tested
C#Getting Started

Store a value in a named variable

C#: Give a value a descriptive name and print it.

C#✓ Tested
C#Data & dates

Sum integer values

Sum a C# sequence using LINQ.

C#✓ Tested
C#LINQ transformations

Take a page from an ordered sequence

C#: Apply a stable order before Skip and Take for predictable paging.

C#✓ Tested
C#LINQ transformations

Test whether any or all values match

C#: Any and All short-circuit instead of materializing filtered collections.

C#✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ Tested
C#Strings

Trim surrounding whitespace

Remove whitespace at the ends of a C# string.

C#✓ Tested
C#Strings

Try parsing an integer

Use TryParse to avoid exceptions for invalid C# integer input.

C#✓ Tested
C#JSON & binary formats

Update a JSON document with mutable nodes

C#: JsonNode permits targeted changes before serializing a document again.

C#✓ Tested