Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto str = "
- class MyClass
- {
- this(int a, float b)
- {
- }
- }";
- // One way
- ldc.Class cls = executionEngine.getClassByName("MyClass");
- auto ctor = cls.getConstructor!(function(int, float))();
- Object instance = ctor(1, 3.14);
- // Another way
- Object instance = cls.instantiate([Variant(1), Variant(3.14)]);
Add Comment
Please, Sign In to add comment