I have a method in a Windows Forms Application where I get the contents from a textbox and store in a string. I would like to get the memory location where the string is stored. In a console application, this works with &stringData
. But I am not able to get the memory location in this case.
This is what the function looks like:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
String^ myString = textBox1->Text;
// Get memory location of myString
}