0
C# question any help is appreciated. How to fix the error and what is the output of the code?
using System; namespace test { class MainClass { static int Test(out int x,int y=4){ x=6; return x*y; } static void Main(string []args){ int a; int z = Test (out a); Console.WriteLine (a+z); } Console.ReadLine(); invalid token '(' in class,struct,or interface member declaration } }
1 Réponse
+ 1
Not an expert at C#, but you are calling a function outside of main?