Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 685 Bytes

File metadata and controls

20 lines (15 loc) · 685 Bytes

CSharpEssentials.Any Example

This console application demonstrates the dynamic Any type from CSharpEssentials.Any.

Features Demonstrated

Feature Description
Any Type Store any value in a single type with Any.Create<T0,T1>(value) or implicit operator
Type Checking Is<TTarget, T0, T1>() to verify the underlying type
Casting As<TTarget, T0, T1>() with safe fallback to default
AnyActionResult Generic success/failure result with any payload
Any<T0,T1> through Any<T0,...,T7> Typed unions for 2 to 8 different types

Running

cd examples/Examples.Any
dotnet run