i have done Splitting only if there is Arithmatic symbols.
but i can able to only Addition(+) ,ex=10+10-10=30 but my expected output is 10.
so how can i do calculations depending upon Arithmetic operator which is i am splitting.
i am confused with this following code . if possible with my code na please suggest me
protected void Button1_Click(object sender, EventArgs e)
{
string[] parts = txt2.Text.Split('+', '-', '*', '/');
decimal intSum = 0;
foreach (string item in parts)
{
intSum = intSum + Convert.ToDecimal(item);
}
txt4.Text = intSum.ToString();
}
thanking You
Paul.S