here is my code below, on my form I have 3 textboxes and a button, what is the code to convert the value entered in a textbox to an integer, here is my error
quantity = (int)(txtQuantity.Text);
int quantity;
decimal unitPrice;
decimal totalPrice;
quantity = (int)(txtQuantity.Text);
// The price of one CD will depend on the number ordered
// The more the customer orders, the lower value for each
if (quantity %26lt; 20)
{
unitPrice = 20;
if (quantity %26lt; 50)
{
unitPrice = 15;
}
if (quantity %26lt; 100)
{
unitPrice = 12;
}
if (quantity %26lt; 500)
{
unitPrice = 8;
}
}
else
{
unitPrice = 5;
}
tota
Visual C# code assistance?
int quantity = Int32.Parse(txtQuantity.Text);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment