This has been asked before in VB (apparently not satisfactory) but not in C#.
I need to add two punctuation marks to my String.Contains method (apart from the already existing "."), namely "!" and "?".
The idea is that the user finishes his/her input with a punctuation mark (i.e period, question mark or exclamation point). If they don't, the input will not be accepted in the text box.
private void textBox1_TextChanged_1(object sender, EventArgs e)
{
if (textBox1.Text.Contains("."))
{
Task.Delay(200).Wait();
MessageBox.Show("Thanks for your input!");
}
else
{
return;
}
How do I add these two? It seems impossible to add them as separate values...