Check for the first char in a text box
-
28-05-2021 - |
Question
I'm trying to check if a textbox starts with a -
.
I tried the following code, but it doesn't work:
if(textbox1->Text::StartWith("-"))
if(String(textbox1->Text).StartWith("-");
La solution
Assuming this is C++/CLI and WinForms (in which case your question really needs retagging),
if (textBox1->Text->StartsWith("-"))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow