문제

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("-");
도움이 되었습니까?

해결책

Assuming this is C++/CLI and WinForms (in which case your question really needs retagging),

if (textBox1->Text->StartsWith("-"))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top