Hi all,
I want to inherit the private class and access the private variables is it possible?
Inherit the Private Class and Access the Private Variables in C#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 19, 2012, 2:55 AM EST
It's also possible to instantiate and access the private members of a private class using reflection.
Here's an example which illustrates both concepts: