DEV Community

KyusunPark
KyusunPark

Posted on • Edited on

06__Method Forms

← Previous / Index / Next →

using System;

namespace CSharp
{
  class Program
  {
    static void MethodA()
    {
      Console.WriteLine("Hello, World!");
    }

    static void MethodB(string message)
    {
      Console.WriteLine(message);
    }

    static int MethodC()
    {
      return (int)(5 + 5.5);
    }

    static double MethodD(double numA, double numB)
    {
      return numA + numB;
    }

    // Main Method (Entry Point)
    static void Main()
    {
      MethodA();
      MethodB("Goodbye, World...");
      Console.WriteLine(MethodC());
      Console.WriteLine(MethodD(5, 10));
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

← Previous / Index / Next →

Top comments (0)