Published · 1 min read

Default Return type of functions in C#

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 .

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.

public void MyFunc()
{
    Console.Write("My Function");
}
Partho Sarathi

Partho Sarathi

Founder, Maxotek

C# & .NET

Our blog

Related posts

Tutorials, notes and news from Maxotek.

View all posts

See what Maxotek makes

Monitoring, conversion tools and more, built by the same people who wrote these posts.