So without using extensions of the class we have apparently two options:
1- Overlayering (Will not be available after Update 14 as per Microsoft)
Reflection is usually used for unit testing in case you need to cover protected or private code and it is hard to call this code using public API.
It has some disadvantages:
1- It breaches entire basis of Object oriented programming.
2- Slow performance.
3- Possible issues with future updates. Private methods could be changed at any time.
However, once you may get into situation where it could be the only option so it’s better to know about this possibility. In below mention images shows how we can use private
variable by reflection technique.
Using reflection namespace:
Get private member: