title: Closing a SerialPort instance inside a class
body: <p>I have created a library class for a control circuit which communicates through a serial port and is used in WinForms. When the class is initialized the serial port is opened</p>
  
  <pre><code>CircuitController controller = new CircuitController("Controller1", COM8, Baud9600, ...);
  </code></pre>
  
  <p>But what is the appropriate way to close the serial port when I exit the WinForm application? Should this be called on the controller specifically</p>
  
  <pre><code>(On close) --&gt; controller.Shutdown();
  </code></pre>
  
  <p>Or will the serial port automatically close when the Form is closed?</p>