C#C
C#3y ago
Shunrai

✅ Attempting to create a method throws CS0116?

Brothers, everything was working fine on the previous projects I started. Now for some reason I am getting CS0116 error on my method that I am trying to create and I can't figure out why. Any ideas?

using System;

namespace _08.MathPower
{
    internal class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Hello World!");
        }
    }
    static int OperatorMethod(int a, int b) //This
    {
        return a+b;
    }
}
Was this page helpful?