none
How to invoke private method RRS feed

  • Question

  • Somebody makes .Net class library.

    there is useful private method inside library.

    private MovePane()
    {

    }

    Can i somehow invoke this method, from his library ?


    Monday, July 28, 2008 1:42 PM

Answers

  • You'll first have to obtain a license from the assembly creator to use this code.  Then you'd need to use Reflection to obtain a MethodInfo instance so you can invoke the method.  Using private methods is almost always a mistake, they were made private for a reason.  You'll probably cause some kind of undesirable side-effect. Please use this forum only to ask questions about the CLR.
    Hans Passant.
    • Edited by nobugzModerator Monday, July 28, 2008 4:12 PM Missed private
    • Marked as answer by Zhi-Xin Ye Friday, August 1, 2008 1:28 PM
    Monday, July 28, 2008 4:07 PM
    Moderator