語言

WebPartManagerInternals.CreateObjectFromType(Type) 方法

定義

根據傳遞給方法的參數建立物件。

public:
 System::Object ^ CreateObjectFromType(Type ^ type);
public object CreateObjectFromType(Type type);
member this.CreateObjectFromType : Type -> obj
Public Function CreateObjectFromType (type As Type) As Object

參數

type
Type

創造 Type 的對象。

傳回

與 相同類型的 ObjectAn type 。

備註

該方法使用 CodeGenerator 類別來建立型別,這是一種比使用 CreateInstance 方法更優效能的替代方案。

適用於

另請參閱