|
-
November 30th, 2011, 08:10 AM
#1
C# Error
Hey, I'm using visual studio 2010 to code a C# program and it's thrown up this error
String was not recognized as a valid Boolean.
in relation to this code...
I can't figure out why, I've tried to error help but I can't make sense of it because I have two versions of the code and one words and the other doesn't.
The code is in relation to this code
Code:
if (theActivityBooking == null) //If new bookings are to be changed then display the below and change the below
theActivityBooking = new ActivityHoliday(cmbWkOfHol.Text, txtName.Text, txtCusAddress.Text, [B] Convert.ToString(txtChildren.Text)[B], cmbActivityType.Text, Convert.ToBoolean(comboUnder16.Text));
else
{ //if editing an existing booking
theActivityBooking.name = txtName.Text;
theActivityBooking.week = cmbWkOfHol.Text;
theActivityBooking.address = txtCusAddress.Text;
theActivityBooking.children = Convert.ToString(txtChildren.Text);
theActivityBooking.activitytype = cmbActivityType.Text;
theActivityBooking.CheckAge = ageconvert(comboUnder16.Text);
}
It's throwing up the error for this line in particular Convert.ToString(txtChildren.Text)
Thanks for any help you can provide
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|