Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • Just checking: Class1 isn't a partial class or anything like that? Commented Mar 2, 2024 at 15:50
  • I presume that having the variable as a private member makes it accessible to the outside world via reflection, whereas a variable inside a method cannot escape. Commented Mar 2, 2024 at 15:54
  • 1
    "Why" is not a good question. Please clarify what kind of answer you are expecting. Commented Mar 2, 2024 at 15:55
  • @Sweeper Something like "the reason for this is ______" Commented Mar 2, 2024 at 15:59
  • 2
    @Sweeper Can you stop being pedantic? If you want, you go ahead and edit my question. I think it's pretty clear. Commented Mar 2, 2024 at 16:03