Home > Net >  The problem is the code where is wrong
The problem is the code where is wrong

Time:12-07

 class Program 
{
The static void Main (string [] args)
{
Say ();
Console.ReadKey();
}
Public static int Say ()
{
Console. WriteLine (" hello, everyone, I am Say way!" );
}

}

CodePudding user response:

Public static int Say () returns the int value, you won't give him the return value
 
Public static int Say ()
{
Console. WriteLine (" hello, everyone, I am Say way!" );
return 0;
}

Or into a public static void Say ()

CodePudding user response:

Say the function () the return value of the int to void
  •  Tags:  
  • C#
  • Related