title: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list
body: <blockquote>
  <p>Error : An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll</p>
  <p>Additional info : Index (zero based) must be greater than or equal to zero and less than the size of the argument list.</p>
  </blockquote>
  <pre><code>namespace Inheritance
  {
      abstract class Airlines
      {
          public int Aid;
          protected string Aname, DOD, ToAdd, ToFrom, FromAdd;
          protected float Cost;
          public void Accept()
          {
              Console.WriteLine(&quot;Enter the Aid,Aname&quot;);
              Aid = Convert.ToInt32(Console.ReadLine());
              Aname = Console.ReadLine();
              Console.WriteLine(&quot;Enter DOD,ToAdd,FromAdd&quot;);
              DOD = Console.ReadLine();
              ToAdd = Console.ReadLine();
              FromAdd = Console.ReadLine();
              Console.WriteLine(&quot;Enter the  Cost&quot;);
              Cost = Convert.ToSingle(Console.ReadLine());
          }
  
          public abstract void DisplayInfo();
          public abstract void facility();
      }
      abstract class SpiceJet : Airlines
      {
          string PaymentMode;
          public void AcceptData()
          {
              //Console.WriteLine(&quot;Welcome&quot;);
              Accept();
          }
  
          public void payment()
          {
              Console.WriteLine(&quot;Enter The Payment Mode =&quot;);
              PaymentMode = Console.ReadLine();
  
          }
          public override void DisplayInfo()
          {
              Console.WriteLine(&quot;Aid id :{0},Aname is:{1},DOD is :{2},ToAdd is:{3},FromAdd is :{4},Cost is :{5},PaymentMode is :{6}&quot;, Aid, Aname, ToAdd, FromAdd, Cost, PaymentMode);
  
          }
          public abstract void typeclass();
  
      }
      class SpiceJetchild : SpiceJet
      {
          public override void facility()
          {
  
          }
          public override void typeclass()
          {
  
          }
      }
      class Program
      {
          static void Main(string[] args)
          {
  
              //Airlines a = new Airline();
              //SpiceJet sj = new SpiceJet();
              SpiceJetchild sj = new SpiceJetchild();
              sj.AcceptData();
              sj.payment();
              sj.DisplayInfo();
              sj.facility();
              sj.typeclass();
              Console.ReadKey();
          }
      }
  }
  </code></pre>