Question Backspace Function

VickyMalhotra

New member
Joined
Sep 23, 2017
Messages
1
Programming Experience
Beginner
hi guys i want to program a backspace function for my Scientific Calculator Project i coded something like this




private void button48_Click(object sender, EventArgs e)

{

textBox_Result.Text = textBox_Result.Text.Remove(textBox_Result.Text.Length - 1);

if (isOperationPerformed == true)

{

textBox_Result.Text = textBox_Result.Text;

}

else if (textBox_Result.Text == "")

{

textBox_Result.Text = "0";

}

i want this code to work only when operation is not performed but if operation performed true then it should not work but it not seems to work :(
 

rfresh

Active member
Joined
Aug 23, 2012
Messages
26
Programming Experience
1-3
>but it not seems to work

What exactly is it doing that makes you think it is not working?

 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,210
Location
Sydney, Australia
Programming Experience
10+
This is OT but what possible use can this line have?
textBox_Result.Text = textBox_Result.Text;
 
Top Bottom