> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baenninger.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Statisch vs. Instanzen

Wir können Klassen, Properties und Methoden als `static` markieren.

* Eine statische Klasse kann nicht instanziiert werden
* Statische Properties und Methoden können ohne Instanz aufgerufen werden

```csharp theme={null}
static class TemperatureConverter
{
    public static double CelsiusToFahrenheit(double celsius)
    {
        double fahrenheit = (celsius * 9 / 5) + 32;
        return fahrenheit;
    }

    public static double FahrenheitToCelsius(double fahrenheit)
    {
        double celsius = (fahrenheit - 32) * 5 / 9;
        return celsius;
    }
}

const temperatureFahrenheit = TemperatureConverter.CelsiusToFahrenheit(22.4);
```
