StringExtensionTryParseToType 方法
将字符串格式化成指定的基本数据类型
命名空间: TouchSocket.Core程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
public static bool TryParseToType(
string value,
Type destinationType,
out Object returnValue
)
Public Shared Function TryParseToType (
value As String,
destinationType As Type,
<OutAttribute> ByRef returnValue As Object
) As Boolean
static member TryParseToType :
value : string *
destinationType : Type *
returnValue : Object byref -> bool
- value String
- 待解析的字符串
- destinationType Type
- 目标数据类型
- returnValue Object
- 解析后的值,输出参数
Boolean如果解析成功返回true,否则返回false