[This is preliminary documentation and is subject to change.]

Converts the value to the specified type. If the value is unable to be converted, the value is checked whether it assignable to the specified type.

Namespace:  Facebook.Json.Utilities
Assembly:  Facebook (in Facebook.dll) Version: 0.2009.3.23 (0.2009.3.23)

Syntax

C#
public static T ConvertOrCast<T>(
	Object initialValue,
	CultureInfo culture
)
Visual Basic (Declaration)
Public Shared Function ConvertOrCast(Of T) ( _
	initialValue As Object, _
	culture As CultureInfo _
) As T
Visual C++
public:
generic<typename T>
static T ConvertOrCast(
	Object^ initialValue, 
	CultureInfo^ culture
)

Parameters

initialValue
Type: System..::.Object
The value to convert.
culture
Type: System.Globalization..::.CultureInfo
The culture to use when converting.

Type Parameters

T
The type to convert or cast the value to.

Return Value

The converted type. If conversion was unsuccessful, the initial value is returned if assignable to the target type

See Also

ConvertUtils Class
ConvertOrCast Overload
Facebook.Json.Utilities Namespace