0
Reply

Sytem.OutofMemoryException and System.InvalidOperaionException

Vinod Singh

Vinod Singh

Mar 20 2009 9:28 AM
2.5k

Hi All,

I am getting   exceptions System.OutOf MemoryException and System.InvalidOpenrationException on the ShowDialog () method ,when i open the dialog multiple times in succession in the following code snipet.

frmTest frmTestDlg = new frmTest (arrList, "StrTitle");

DialogResult dlgResult=frmTestDlg .ShowDialog(this);

bool b1 = frmTestDlg .propB1;

.

.

frmTestDlg .Close();

frmTestDlg .Dispose();

The same exception falls on the Main() method of the program.

though i m disposing and setting null  dialog every time i open  plz help me ..

many thanks in advance...