Skip to content

M_Cyjb_GenericConvert_ChangeType__2

CYJB edited this page Mar 20, 2024 · 13 revisions

GenericConvert.ChangeType(TInput, TOutput) 方法 (TInput)

返回指定类型的对象,其值等效于指定对象。

Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public static TOutput ChangeType<TInput, TOutput>(
	TInput value
)

参数

 

value
Type: TInput
要转换的对象。

类型参数

 

TInput
要转换的对象的类型。
TOutput
要将 value 转换到的类型。

返回值

Type: TOutput
一个对象,其类型为 TOutput, 并且其值等效于 value

Exceptions

 

异常 条件
InvalidCastException 不支持此转换。

参见

Reference

GenericConvert 类
ChangeType 重载
Cyjb 命名空间

Clone this wiki locally