Click or drag to resize
DigitalRuneObjectHelperParseT Method (String)
Parses the specified value (using the invariant culture).

Namespace: DigitalRune
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public static T Parse<T>(
	string value
)

Parameters

value
Type: SystemString
The value.

Type Parameters

T
The target type.

Return Value

Type: T
The parsed value.
Exceptions
ExceptionCondition
NotSupportedException Cannot convert string to target type.
Remarks

This method can parse values of types that

  • implement System.IConvertible,
  • have a static method Parse(string) or Parse(string, IFormatProvider), or
  • have a TypeConverter.

A NotSupportedException is thrown for other types that do not have an automatic mechanism for value conversion from string. Further, an exception can be thrown if the given string is invalid.

See Also