Is it possible to override a private method by using Reflection in .NET 3.5?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, it would need to be
virtualto be possible to override it (by writing a dynamic type that inherits from the class), and you can’t have aprivate virtual(it makes no sense). You could perhaps override aninternal virtual, but I suspect even this may hit security issues. So ultimately, I’d say no.