title: How to access private function of a class in another class in c#?
body: <p>I am new to c# programming and i know public data member of class is accessible from another class.Is there any way i can access private function from another class?</p>
  
  <p>This is what i have tried.please help me out.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace ConsoleApplication7
  {
      class Program
      {
          private class Myclass
          {
              private int Add(int num1, int num2)
              {
                  return num1 + num2;
              }
          }
          static void Main(string[] args)
          {
              Myclass aObj = new Myclass();
              //is there any way i can access private function
          }
      }
  }
  </code></pre>