Table of Contents

Class ConverterStringDynamic

Namespace
Dec
Assembly
dec.dll

Alternate dynamic-typed class for converting to arbitrary types via strings.

public abstract class ConverterStringDynamic : ConverterString
Inheritance
object
Converter
ConverterString
ConverterStringDynamic

Remarks

This is a variant of ConverterString that allows you to use arbitrary types, which is helpful if you're trying to convert non-public types.

In most cases it should be avoided.

Methods

Read(string, Context)

Converts a string to a suitable object type.

public abstract object Read(string input, Context context)

Parameters

input string
context Context

Returns

object

Remarks

In case of error, call Dec.Dbg.Err with some appropriately useful message and return default. Message should be formatted as $"{context}: Something went wrong".

Write(object)

Converts an object to a string.

public abstract string Write(object input)

Parameters

input object

Returns

string