0
点赞
收藏
分享

微信扫一扫

2018-2-13-win10-uwp-从Type使用构造

zidea 2024-10-11 阅读 21

title

author

date

CreateTime

categories

win10 uwp 从Type使用构造

lindexi

2018-2-13 17:23:3 +0800

2018-2-13 17:23:3 +0800

Win10 UWP

本文主要:如何从 Type new一个对象

原本从 WPF ,要想 new 一个对象从 type ,可以使用type.Assembly.CreateInstance(type.FullName);

但是在 UWP ,需要使用type.GetConstructor(Type.EmptyTypes).Invoke(parameters);

多谢 durow ,找了很久在他写的 刚好有这个






举报

相关推荐

0 条评论