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
Post a Comment