title: Called form not starting at beginning of form code
body: <p>[using VS Community 2019 v16.10.4 on Win 10 Pro 202H]</p>
  <p>I'm working on a C# Winforms desktop app which monitors some local drive properties and displays a status message. If a drive selected for monitoring is missing, an error message is displayed providing the user an option to plugin missing drives than rerun analysis.</p>
  <p>When I plug-in the &quot;missing&quot; drive and rerun the scan/analysis, the change is not being picked up even though Windows Explorer/file manager is detecting the change.</p>
  <p>If I terminate and than restart the debug session the change is picked up, and if I use a listbox (temporarily starting the window normal) to manually check re-instantiation, the changes are picked up.</p>
  <p>The form getting data is the app entry; it performs data acquisition using a <code>BackgroundWorker</code>. It starts minimized and not shown in taskbar. I’ve set at breakpoint in error message form on the line creating the new instance of the initial form. When I step through (F11) it doesn’t start at the beginning of the initial form’s code but partway down where the percentComplete field is declared and assigned:</p>
  <pre><code>ReadinessStartup refresh = new ReadinessStartup(); //breakpoint here
  refresh.Show();
  </code></pre>
  <pre><code>public partial class ReadinessStartup : Form
  {
      public static DriveInfo[] _allDrives = DriveInfo.GetDrives();
      private static readonly List&lt;MonitorDrvs&gt; _monitoredDrives =
               ConnectionConfig.Connects.GetMonitoring();
  
      private static System.Timers.Timer _myTimer;
  
      private readonly static int _mDrvsNum = _monitoredDrives.Count;
      private volatile bool _progFlag;
      private double _elapsedTime;
      private double _estTotal;
      private double _percentComplete = 0; // ENTERS FORM HERE ON F11
      private int _allDrvsNum;
      private int _progBarPC;
  
      public static bool _Refresh;
  
      public ReadinessStartup()
      {
          InitializeComponent();
          InitializeBackgroundWorker();
          bgWorker.RunWorkerAsync();
      }
  </code></pre>
  <p>So it appears it’s not picking up the changes because the required declaration is not being processed. Why isn’t the form code starting at the beginning?</p>
  <p>Any help will be appreciated.</p>
  <p>==== Elucidation Edit ====</p>
  <p>to @Jimi comment: The solution has three projects; a Setup project,  a Monitoring project and a class Library.  Setup is executed from the Start Menu and Monitoring from Task Scheduler. _montoredDrives is defined in Setup and &quot;consumed&quot; in Monitoring. _allDrives and _montoredDrives are used in methods called in the BackgroundWorker DoWork to determine if drives identified for monitoring are currently missing or changed (on different disks/partitions).  DriveInfo[] is used rather than a list because various drive usage properties (specifically size, free &amp; used space) are needed for analyses.</p>