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

Converts the value 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 bool TryConvert<T>(
	Object initialValue,
	CultureInfo culture,
	out T convertedValue
)
Visual Basic (Declaration)
Public Shared Function TryConvert(Of T) ( _
	initialValue As Object, _
	culture As CultureInfo, _
	<OutAttribute> ByRef convertedValue As T _
) As Boolean
Visual C++
public:
generic<typename T>
static bool TryConvert(
	Object^ initialValue, 
	CultureInfo^ culture, 
	[OutAttribute] T% convertedValue
)

Parameters

initialValue
Type: System..::.Object
The value to convert.
culture
Type: System.Globalization..::.CultureInfo
The culture to use when converting.
convertedValue
Type: T %
The converted value if the conversion was successful or the default value of T if it failed.

Type Parameters

T
The type to convert the value to.

Return Value

true if initialValue was converted successfully; otherwise, false.

See Also

ConvertUtils Class
TryConvert Overload
Facebook.Json.Utilities Namespace