# Top-Level Statements

A feature that allows a small C# program to omit an explicit Program class and Main method.

## What is **Top-Level Statements** in C#?

**Top-Level Statements** — A feature that allows a small C# program to omit an explicit Program class and Main method.

```csharp
class Program
{
    static void Main()
    {
        string message = "Hello, C#!";
    }
}
```

Level: Novice · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/novice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/top-level-statements
