RESTCLIENT.NET
Menu
EN
↗ GitHub

RESTCLIENT.NET / API REFERENCE

Outcome.Unit

All API types · Outcome · View source

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public sealed record Unit

Represents a void return type or a type with only one value.

Remarks: Unit is a type that has exactly one value, similar to void in functional programming. It is commonly used as a return type for operations that don't return a meaningful value, or as a type parameter when a generic type is required but no data needs to be carried. This implementation uses a sealed record with a private constructor to ensure only one instance exists (accessible via Value), providing referential equality.

Members

Value

public static Unit Value { get; }

Gets the single value of the Unit type.

View source: Outcome/Unit.cs:22