title: Common usage of static array in two different console applications
body: <p>I've got a problem with a .NET Core 2.2 console application.
  I want to start an console app with an static array. This one connects to an TCP/IP partner.</p>
  <p>On start up, I start an second console application, which should use the same static array, and the same connection as the first console application.
  I want to split both apps, cause it is an 'option package'. Both apps are running as background services with timed async functions.
  Both apps share the same namespace and are configured in the same project.
  The child app have an dependency of the parent app.</p>
  <p>Until now, I can start both apps in the same console (as child-process), but the child-console can't use the static array.</p>
  <p>How can I solve it?</p>
  <p>Here is my Program.cs Main Method:</p>
  <pre class="lang-cs prettyprint-override"><code>    static async Task Main(string[] args) {  
       Portal_Connect.PLC = new Class_PLC[11];     
       if ((Configuration.Diagnostic))           
       {             
        var process = new Process        
        {             
          StartInfo = new ProcessStartInfo           
          {             
            FileName = &quot;dotnet &quot;,
            Arguments = Directory.GetCurrentDirectory() + \\Diagnostic.dll&quot;,
            WorkingDirectory = Directory.GetCurrentDirectory(),
            UseShellExecute = false,          
            RedirectStandardOutput = false,            
            RedirectStandardError = false,
            CreateNoWindow = false          
          }                
        };                
      process.Start();
      process.PriorityClass = ProcessPriorityClass.High;                
      process.ProcessorAffinity = (IntPtr)6; 
     }
  }
  </code></pre>