I'm using serial communication over USB and on start of the application, device is already connected and thing works fine. When I disconnect the device (Symulation an error) the application doesnt break,and if I try to reopen serialport from application it has no effect. Later , debugger says that disposal happend. I want to know, how to restore connection dynamically when device reconnects again. It all loops in timer
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose(); ===> Exception is pointing at this
}
base.Dispose(disposing);
}