5
Reply

In C# If we do not pass string[] args array of string inside the Main() function which is the entry point of the application then what effect will be happen on application?

Ujjval Shukla

Ujjval Shukla

7y
2.3k
1
Reply

    No Effect. 1) The parameter of the Main method is a String array that represents the command-line arguments. 2) Command line arguments commonly get used when you need to pass information to your application at runtime. 3) For example if you were writing a program that copies a file from one location to another you would probably pass the two locations as command line arguments. For example: 4) Copy.exe C:\file1.txt C:\file2.txt

    As far as you are not going to pass command line arguments, no need to write string[] args.

    No Effects

    no change on entry point and it's starts normally with Main method.

    No, Effects on entry of point of your applicationif you are creating the EXE like MyDemoApp.execlass Program {static void Main(string[] args){foreach (var arg in args){Console.WriteLine(arg);}} }Command line like this:MyDemoApp.exe agrument1 agrument2 agrument3if you are not passing the string[] agrs then you can not paas the arguments in command line.but Exe will run fine.