Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーが「!」を入力した場合 「?」テキストボックスに「、」を入力してボタンを押すと、この人にはラベルにエラーメッセージが表示されます。どうすればそれを作ることができますか?そして、コードは何ですか?
ボタンクリックハンドラーで実行します。
if (textbox.text.contains("!") || textbox.text.contains("?") || textbox.text.contains(",")){ //display error message code label.text = "ERROR"; }