I am using windows application
here is my piece of code where i Get AccessviolationException
exception and error : attempted to read or write protected memory which is most common error. Main problem is i get this error after execution of thhis code 2-3 times..
private void btnBrowse_Click(object sender, EventArgs e)
{
openFileDialog.Filter = "Excel Files|*.xls;*.xlsx;*.xlsm;*.csv;*.txt";
openFileDialog.ShowDialog(); // here i get above eoor after this method execute 2-3 time not before that (on development machine)
}
When i tranfer EXE file to Client's machine, on btnBrowse_Click
suddenly Application crashes and stopped working.. not even work one time.
What i have tried so far??
1) checked check box "Enable unmanaged code debugging
" in project properties
2) tried to handle AccessViolationexception
error using [HandleProcessCorruptedStateExceptions
] and try catch ..