Neeraja Sathyadas

Neeraja Sathyadas

  • NA
  • 36
  • 13.2k

I want to add age in fractions like 0.5, 1.5 etc.,

Feb 5 2015 11:36 AM
I want to add age in fractions like 0.5, 1.5 etc., in my aplication, 
the data type was int earlier, i changed it to decimal but when i put decimal points the aplication exits.
there are some conditions too.. part of the code i found is given below

 private void txtAge_TextChanged(object sender, EventArgs e)
        {
            if (txtAge.Text != "")
            {
                if (Convert.ToInt32(txtAge.Text) > 18)
                {
                    txtFees.Text = Convert.ToString(2);
                }
                else
                    txtFees.Text = Convert.ToString(0);


plz help

Answers (9)