From e3cab89d847a0fed0151dcaf92293ea8581da704 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 27 Oct 2022 11:13:05 +0100 Subject: [PATCH] Allow unsafe code in examples (#650) Towards #646. --- standard/unsafe-code.md | 1 + tools/example-templates/code-in-main/Project.csproj | 1 + tools/example-templates/standalone-console/Project.csproj | 1 + tools/example-templates/standalone-lib/Project.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/standard/unsafe-code.md b/standard/unsafe-code.md index 0948a7b9d..97cefe8cc 100644 --- a/standard/unsafe-code.md +++ b/standard/unsafe-code.md @@ -39,6 +39,7 @@ unsafe_statement > *Example*: In the following code > +> > ```csharp > public unsafe struct Node > { diff --git a/tools/example-templates/code-in-main/Project.csproj b/tools/example-templates/code-in-main/Project.csproj index 2a1c70ea3..e774e1230 100644 --- a/tools/example-templates/code-in-main/Project.csproj +++ b/tools/example-templates/code-in-main/Project.csproj @@ -6,6 +6,7 @@ enable disable $example-name + true diff --git a/tools/example-templates/standalone-console/Project.csproj b/tools/example-templates/standalone-console/Project.csproj index 2a1c70ea3..e774e1230 100644 --- a/tools/example-templates/standalone-console/Project.csproj +++ b/tools/example-templates/standalone-console/Project.csproj @@ -6,6 +6,7 @@ enable disable $example-name + true diff --git a/tools/example-templates/standalone-lib/Project.csproj b/tools/example-templates/standalone-lib/Project.csproj index 46dd51ea4..65e093b49 100644 --- a/tools/example-templates/standalone-lib/Project.csproj +++ b/tools/example-templates/standalone-lib/Project.csproj @@ -4,6 +4,7 @@ net6.0 enable $example-name + true