Since
main()
returns an
int
, it needs a
return
statement, and it should have a value after it that is of the appropriate type.
Go here:
http://msdn.microsoft.com/en-us/library/0fwzzxz2(v=vs.80).aspx[
^]
BTW, in .Net 4, when you create a new console app, the return type in
main()
is
void
, so no
return
statement is needed. I think you can change the return type though, but I've never tried it.
Calling
return;
in a method that doesn't return a value doesn't serve any purpose. You can safely remove it.