The code below is for making Calculator. But I have trouble with equal button (Button13_Click). When I click it, this error happen:
In line: resultplus = sArg.Contains("+"); NullReferenceException was unhandled by user code. Object reference not set to an instance of an object. Use the "new" keyword to create an object instance.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private int nArg1;
private int nArg2;
private string sArg;
private int nEqual;
bool resultplus;
bool resultminus;
bool resultdi ...
Go to the complete details ...