Myk*_*kun 3 c# reflection .net-core
在.NET Framework中,这种方法存在:
public ConstructorInfo GetConstructor(
BindingFlags bindingAttr,
Binder binder,
CallingConventions callConvention,
Type[] types,
ParameterModifier[] modifiers
)
Run Code Online (Sandbox Code Playgroud)
但是在.NET Core(1.1)中,我只找到了扩展名,这没有给我私有构造函数:
public static ConstructorInfo GetConstructor(this Type type, Type[] types)
Run Code Online (Sandbox Code Playgroud)
所以我想知道我是否可以通过某种方式访问并获得.NET Core中的私有构造函数。
| 归档时间: |
|
| 查看次数: |
138 次 |
| 最近记录: |