I am new to programming
I am coding in C# and its kind of confusing.
What is the difference between these:
Thank you very much in advance!
1- function uses to return an integer number
int main()
{
return 1;
}
so if you call this function like this:
int x = main();
result of x will be "1"
2- void function does n't return any value
void main()
{
Console.WriteLine("Hello World");
}
so you can call this function like this:
void main();
this just execute "void main" function and would not return anything