private static void releaseObject(object obj) { try { System.Runtime.InteropServices.Marshal.ReleaseComObject(obj); obj = null; } catch (Exception ex) { obj = null; MessageBox.Show("Unable to release the Object" + ex.ToString()); } finally { GC.Collect(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)