You are here: Symbol Reference > Stimulsoft.Base.Json.Utilities Namespace > ConvertUtils Class > ConvertUtils Methods > ConvertOrCast Method
Stimulsoft Reports Class Reference
ContentsIndexHome
PreviousUpNext
ConvertUtils.ConvertOrCast Method

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.

Syntax
C++
C#
Visual Basic
public: object ConvertOrCast( object initialValue, CultureInfo culture, Type targetType );
Parameters
Parameters 
Description 
initialValue 
The value to convert. 
culture 
The culture to use when converting. 
targetType 
The type to convert or cast the value to. 
Returns

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

Made with Doc-O-Matic.
What do you think about this topic? Send feedback!
Copyright (c) 2017. All rights reserved.