How can I protect my private funcs against reflection executing?

前端 未结 9 1213
深忆病人
深忆病人 2020-12-05 15:05

After seeing this: Do access modifiers affect reflection also?

I tried using this, but it doesn\'t work: \"enter

9条回答
  •  清歌不尽
    2020-12-05 16:06

    Access modifiers are not a security mechanism.

    If if you could prevent your function from being called via reflection, the user can just decompile your program, extract that function, put it in a new assembly and execute it.

提交回复
热议问题