c# - PrivateObject instead of Reflection in a production code -


by "reflection" mean using system.reflection namespace.

msdn says privateobject class: "allows test code...". privateobject syntax more system.reflection 1 wonder there real reason not use in production code, , keep unittests only?

you can't use privateobject reflect on type. in other words: can't use members of type.
can use if know names of members beforehand.

that said, don't see reason why shouldn't allowed use it, if constraints don't matter in scenario.
class public, documented , not deprecated.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -