Sisk

Method

StringValue.Get<T>

Namespace
Sisk.Core.Entity
Assembly
Sisk.Core.dll

Get<T>(IFormatProvider?) #

Parses the value contained in this StringValue as a type T that implements IParsable. Throws an exception if the value couldn’t be parsed to the target type.

C#
public T Get<T>(IFormatProvider? formatProvider = null) where T : IParsable<T>

Parameters #

formatProvider IFormatProvider?

The IFormatProvider to use for parsing. Defaults to null.

Returns #

T

The converted value of type T.

Type Parameters #

T

The type to parse the value to.

Exceptions #

FormatException

Thrown when the value cannot be parsed to type T.

Type to search the documentation and the API reference.