# Managed Code

Code whose execution and memory are managed by the .NET runtime.

## What is **Managed Code** in C#?

**Managed Code** — Code whose execution and memory are managed by the .NET runtime.

```csharp
class Greeting
{
    string Message = "Hello, C#!";
}
```

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

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/managed-code
