Calculator Button
Join the DZone community and get the full member experience.
Join For Free// description of your code here
if (onFirst)
{
int length; // length of word
length = (myCalculator.First).Length;
if (myCalculator.First == "0")
{
//do nothing
}
else if (length == 1 && (myCalculator.First != "0"))
{
myCalculator.First = "0";
}
else
{
myCalculator.First = (myCalculator.First).Substring(0, length - 1);
}
label1.Text = myCalculator.First;
}
Calculator (Mac OS)
Opinions expressed by DZone contributors are their own.
Comments