void

A return type showing that a method returns no value.

What is void in C#?

void — A return type showing that a method returns no value.

class Order
{
    void MarkAsPaid()
    {
        bool paid = true;
    }
}

Level: Apprentice · More C# terms at this level

Updated

In other subjects