Abolfazl

Abolfazl

  • 1.5k
  • 184
  • 78.8k

How to call a private method from another class?

Jul 19 2016 11:55 AM
hi
I have a public class with a private method inside this class, I want to call this private method from another class. I know I can use reflection or delegate but I should do it without using reflection or delegate.
 
  1. public class MyClass  
  2. {  
  3.      private void Method()  
  4.       {  
  5.              //method codes  
  6.       }  
  7. }  
how to call Method?
 
thanks 
 
 

Answers (4)