Table of Contents

Class ConversionUtils

Namespace
NanoByte.Common.Values
Assembly
NanoByte.Common.dll

Helpers for working with type converters.

public static class ConversionUtils
Inheritance
object
ConversionUtils

Methods

ConvertFromString<TType>(string)

Uses the type converter for TType (set with System.ComponentModel.TypeConverterAttribute) to parse a string.

public static TType ConvertFromString<TType>(this string value)

Parameters

value string

Returns

TType

Type Parameters

TType

ConvertToString<TType>(TType)

Uses the type converter for TType (set with System.ComponentModel.TypeConverterAttribute) to generate a string.

[Pure]
public static string ConvertToString<TType>(this TType value)

Parameters

value TType

Returns

string

Type Parameters

TType