Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Main method - An overview in C#

"Void" guides main method not to wait for any return types. It will simply execute the operations in the block.

  1. static void Main()
  2. {
  3. //...
  4. }


This code forces the main method to return one integer value. For example, if you pass two numbers and expect the sum of those from a method, you can make use of the specific return types.

  1.  
  2. static int Main()
  3. {
  4. //...
  5. return 0;
  6. }
  7.  


Main method welcomes arguments also for a efficient program.

  1.  
  2. static int Main(string[] args)
  3. {
  4. //...
  5. return 0;
  6. }
  7.