// I have a textBox and would like to copy its contents
// into a string called myColor
string myColor= "BLUE"; // OK works as expected
textBoxColor->Text = "BLUE"; // OK The textbox accepts a string literal
// But ... none of the following seems to work - all have errors
myColor = textBoxColor->Text;
myColor = textBoxColor.Text;
myColor = std::string( textBoxColor->Text);
myColor = System::String(textBoxColor->Text);
myColor = Convert.ToString(textBoxColor->Text);
myColor = System::Convert::ToString(textBoxColor->Text);
myColor = String::Parse(textBoxColor->Text);
myColor = textBoxColor->Text;
// ------------ Suggestions please
// Bob
// into a string called myColor
string myColor= "BLUE"; // OK works as expected
textBoxColor->Text = "BLUE"; // OK The textbox accepts a string literal
// But ... none of the following seems to work - all have errors
myColor = textBoxColor->Text;
myColor = textBoxColor.Text;
myColor = std::string( textBoxColor->Text);
myColor = System::String(textBoxColor->Text);
myColor = Convert.ToString(textBoxColor->Text);
myColor = System::Convert::ToString(textBoxColor->Text);
myColor = String::Parse(textBoxColor->Text);
myColor = textBoxColor->Text;
// ------------ Suggestions please
// Bob