Generation

generate functionTue, 06 Jun 2023

I need to validate a text box and give and error if they type a number in windows web forms

public void validate(string input) { if(int.TryParse(input)) { throw new ArgumentException("This is not a valid input"); } }

Want to kickstart your project?Use the new AI Studio to create your code