private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { if (openFileDialog1->ShowDialog() == DialogResult1.OK) { textBox1->Text = openFileDialog1->FileName; StreamReader ^sr =gcnew StreamReader(textBox1->Text); textBox4->Text = sr->ReadToEnd(); }
error C2228: left of '.OK' must have class/struct/union 1> type is 'System::Windows::Forms::DialogResult ^'
::DialogResult::OK
if (openFileDialog1->ShowDialog() == DialogResult1.OK)
if (openFileDialog1->ShowDialog() == DialogResult.OK)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)