Hi,
Iam using Vs2015, While I try to Open a file using OpenFileDialog, Iam receiving the error

"Unhandled exception of type" System.AccessViolationException" occoured in system.windows.forms.dll
Additional information: Attempted to read or write protected memory.This is often an indication other memory is currupt.

My Codes

openFileDialog1->Title= "Select Your Excel File";
openFileDialog1->InitialDirectory = "C:\";
openFileDialog1->Filter = "Excel Files (.xls)|.xls|All files (.)|.";
openFileDialog1->FilterIndex = 2;
openFileDialog1->RestoreDirectory = true;
if (openFileDialog1->ShowDialog() == System::Windows::Forms:ialogResult::OK) {
MyExcelFile = openFileDialog1->FileName;
}

I cannot understand my mistake !
Thanks For the helps!