title: access base class variable in derived class
body: <pre><code>class Program
  {
      static void Main(string[] args)
      {
          baseClass obj = new baseClass();
          obj.intF = 5;
          obj.intS = 4;
          child obj1 = new child();
          Console.WriteLine(Convert.ToString(obj.addNo()));
          Console.WriteLine(Convert.ToString(obj1.add()));
          Console.ReadLine();
      }
  }
  public class baseClass
  {
      public int intF = 0, intS = 0;
      public int addNo()
      {
          int intReturn = 0;
          intReturn = intF + intS;
          return intReturn;
      }
  }
  class child : baseClass
  {
      public int add()
      {
          int intReturn = 0;
          intReturn = base.intF * base.intS;
          return intReturn;
      }
  }
  </code></pre>
  
  <p>I want to access intF and intS in child class whatever i input.. but i always get the values of both variables 0. 0 is default value of both variables.</p>
  
  <p>Can anyone tell me that how can i get the value???</p>
  
  <p>thx in adv..</p>