How in C# to run a hidden console application?

A simple C# application written in notpade, it console.
Accordingly, at startup, start the console and while the console is visible, on slower PC's look so-so. Well, the question itself " How in C# to run a hidden console application ? "that would console was minimized or not displayed to the user, the code for better idea of the problem.
using System;
using System.Diagnostics;
using System.IO;
namespace Start1CEnterprise
{
 class StartEnterprise
 { 
 static void Main()
{
 // set some variables here version of our database on the server
 string vers = "";
 // start mode left just like that, but it works
 ForS string = "";
 // Server
 string server = "";
 // Base
 string bases = "";
 // counter to iterate over the attributes
 int chek = 0;
 // iterate all lines in the file and store it in the variables mentioned above
 string[] param = File.ReadAllLines("param.txt");
 foreach(string par in param)
{
switch(chek)
{
 case 0: vers = par;break;
 case 1: ForS = par;break;
 case 2: server = par;break;
 case 3: bases = par;break;
}
 chek++; 
}


 atributs string = @"... /"+ForS+" "+server+@"\"+bases+@" ...";

 string[] adress = new string[] 
{
 @"C:\Program Files (x86)\..\"+vers+@"\bin\...exe",
 @"C:\Program Files (x86)\..\"+vers+@"\bin\...exe",
 @"C:\Program Files\..\"+vers+@"\bin\...exe",
 @"C:\Program Files\..\"+vers+@"\bin\...exe",
@"\\..\..\"+vers+@"\bin\...exe",
 @"\\..\..\"+vers+@"\bin\...exe" 
};
 // check all the addresses 
 foreach(string adres in adress)
 { 
 // check whether the file
if(File.Exists(adres))
{
 // run it
 Process.Start(adres, atributs);
 // don't continue to iterate and come out of the cycle
break;
}

}
}
}
}
July 2nd 19 at 13:12
1 answer
July 2nd 19 at 13:14
Solution
In the project properties you can change the build type to Windows Application.
"written in notpade" specially marked, compilation csc.exe to change the type of Assembly there is no possibility... - trevor.Boehm95 commented on July 2nd 19 at 13:17
: Is the key csc /target:winexe. - Giles_McClure commented on July 2nd 19 at 13:20
: will test, but I think this is the solution thank you !!! - trevor.Boehm95 commented on July 2nd 19 at 13:23
: Yes this is the solution, thanks ) - trevor.Boehm95 commented on July 2nd 19 at 13:26

Find more questions by tags C#Terminal