CoreExtensionCloneT(Object) Method

跨型別複製物件

Definition

Namespace: eBizprise.Framework
Assembly: eBizprise.Framework.Core (in eBizprise.Framework.Core.dll) Version: 26.0.0.0+6e92afb880fa099fdfe407c9aa8d1b17eaaf3625
C#
public static T Clone<T>(
	this Object sourceObject
)
where T : new()

Parameters

sourceObject  Object
來源物件

Type Parameters

T
目標物件類型

Return Value

T
複製物件

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

C#
SourceClass source = new SourceClass() { Name = "Test", Value = 100 };
var target = source.Clone<TargetClass>();

Revision History

DateVersionDescription
2026/01/0726.0.0.0支援跨型別物件複製

See Also