Table of Contents

Class ConverterExtensions

Namespace
Cratis.Applications
Assembly
Cratis.Applications.dll

Provides methods for converting values between different types.

public static class ConverterExtensions
Inheritance
ConverterExtensions
Inherited Members

Methods

ConvertTo(object, Type)

Converts a value to the specified target type, handling concepts and nullable types.

public static object? ConvertTo(this object value, Type targetType)

Parameters

value object

The value to convert.

targetType Type

The target type to convert to.

Returns

object

The converted value.

Remarks

Supports converting primitives to their ConceptAs<T> counterparts.