|
-
July 21st, 2005, 04:04 AM
#1
windows forms, textbox and string comparison
Can somebody please tell me how to get the text from a textbox in a way that is comparable to other strings, ie:
String *myText = textBox1->Text->ToString();
String *myText = textBox1->get_Text();
Both get the value of the textbox but do not compare with other strings, ie:
if the textbox value is Carl and I try to compare them:
if(myText == "Carl"){
MessageBox::Show("You are Carl");
}else{
MessageBox::Show(myText);
}
The second message box is shown with a value of Carl.
Any help would be greatly appreciated.
Regards
Carl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|