相关疑难解决方法(0)

找到一个有反射的私人领域?

鉴于这门课程

class Foo
{
    // Want to find _bar with reflection
    [SomeAttribute]
    private string _bar;

    public string BigBar
    {
        get { return this._bar; }
    }
}
Run Code Online (Sandbox Code Playgroud)

我想找到我将用属性标记的私有项_bar.那可能吗?

我已经用我寻找属性的属性做了这个,但从来没有私有成员字段.

获取私有字段需要设置哪些绑定标志?

.net c# reflection .net-attributes

219
推荐指数
8
解决办法
15万
查看次数

如何保护我的私有函数不被反射执行?

看到这个之后:访问修饰符也会影响反射吗?

我尝试使用它,但它不起作用: 在此输入图像描述

如何防止反射执行我的私有方法?

.net c# reflection

13
推荐指数
4
解决办法
4501
查看次数

标签 统计

.net ×2

c# ×2

reflection ×2

.net-attributes ×1