title: c# not all code paths return a value error
body: <p>I get the following error in c# with this code
  "not all code paths return a value"
  I am trying to create a programming language using it.
  any help is greatly appreciated.</p>
  
  <pre><code>private Expr ParseExpr()
  {
      if (this.index == this.tokens.Count)
      {
          throw new System.Exception("expected expression, got EOF");
      }
      if (this.tokens[this.index] is Text.StringBuilder)
      {
          string Value = ((Text.StringBuilder)this.tokens[this.index++]).ToString();
          StringLiteral StringLiteral = new StringLiteral();
          StringLiteral.Value = Value;
      }
      else if (this.tokens[this.index] is int)
      {
          int intvalue = (int)this.tokens[this.index++];
          IntLiteral intliteral = new IntLiteral();
          intliteral.Value = intvalue;
          return intliteral;    
      }
      else if (this.tokens[this.index] is string)
      {
          string Ident = (string)this.tokens[this.index++];
          Variable var = new Variable();
          var.Ident = Ident;
          return var;
      }
      else
      {
          throw new System.Exception("expected string literal, int literal, or variable");
      }
  }                     
  </code></pre>