Switch language한국어
Back to the list

Microsoft is tightening restrictions on the use of unsafe code in C#

TL;DR AI

Key summary

2 min read
  1. Microsoft is redesigning C#’s unsafe code model so risky memory operations are marked more explicitly, rather than with broad class- or file-level annotations.

  2. The new approach starts as optional, but it will apply immediately to .NET runtime libraries and preview in C# 15/.NET 11 before a fuller release in C# 16/.NET 12.

  3. The goal is to make pointer and memory risks easier to spot in code review and tooling, especially as AI-generated code becomes more common.

  4. The shift aims to improve safety without breaking existing apps right away, nudging C# toward stricter Rust-like practices over time.

Read the original