How do I create a Boolean statement to allow text only? I have this code only allowing the user for input numbers, but that does not mean how to do text.
bool Dest = double.TryParse (this.xTripDestinationTextBox.Text, out of miles); Bull Mealsgal = Double. Trips (it X. TripPPTextbox. Text, MPG out); Bool PriceGal = Double TryParse (this.xTripPricepgTextBox.Text, out of value);
You can use the following code in the keyboard instance:
< Pre> if (! Char.IsLetter (e.KeyChar)) {e.Handled = true; }
Comments
Post a Comment