There is NO default return type of functions in C#. If you don’t want to return any value, the function must be declared as void.

1
2
3
4
public void MyFunc()
{
    Console.Write("My Function");
}
Rating: 5.0/5. From 1 vote.
Please wait...