How to get the value of private field in C#?

后端 未结 8 1935
我在风中等你
我在风中等你 2020-11-29 06:55

I ran into a problem that I need to access to private field of a class. For example:

class MyClass 
{
    private string someString;

    public MyClass( stri         


        
8条回答
  •  孤街浪徒
    2020-11-29 07:51

    Use reflections, but be prepared to be hit with a big stick from a fellow programmer.

提交回复
热议问题