Class DynamicObject
- Namespace
- ZapLib
- Assembly
- ZapLib.dll
允許在執行期間才新增成員的實體物件,等價實體的 Class,而非 dynamic。因此可適應全部 reflaction 功能
public class DynamicObject
- Inheritance
-
DynamicObject
- Inherited Members
Constructors
DynamicObject(string)
建構子,定義全新物件類別
public DynamicObject(string TypeName)
Parameters
TypeNamestring類別名稱
Properties
Core
實體物件
public object Core { get; }
Property Value
CoreType
實體物件的 Type 物件
public Type CoreType { get; }
Property Value
Methods
CreateObject()
將類別建立實例 (new 出來)
public object CreateObject()
Returns
- object
建立的實體物件
CreateProperty(string, Type, object)
定義並新增實體類別的成員
public void CreateProperty(string PropertyName, Type PropertyType, object DefaultValue = null)
Parameters
SetProperty(string, object)
設定實體物件的成員數值
public void SetProperty(string PropertyName, object Value)