From 30d99c3906985677babd31fe9a4cff1c4e4825a2 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 8 Nov 2023 09:25:04 +0100 Subject: [PATCH] Fix introductions (#2198) --- concepts/attributes/introduction.md | 2 +- concepts/do-while-loops/about.md | 2 +- concepts/do-while-loops/introduction.md | 2 +- concepts/flag-enums/introduction.md | 2 +- exercises/concept/attack-of-the-trolls/.docs/introduction.md | 4 ++-- .../concept/interest-is-interesting/.docs/introduction.md | 2 +- exercises/concept/tim-from-marketing/.docs/introduction.md | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/concepts/attributes/introduction.md b/concepts/attributes/introduction.md index ca6cd807b2..23b23afce5 100644 --- a/concepts/attributes/introduction.md +++ b/concepts/attributes/introduction.md @@ -15,4 +15,4 @@ class MyClass This declarative metadata only associates additional structured information to the code and does not modify its behavior, but that metadata is used by other part of the code to change how its target would behave or add, change or remove, restrict some its functionalities. -There are many [predefined and reserved attributes](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/general#conditional-attribute), for example: `Flags`, `Obsolete`, `Conditional`, each has a specific that can be looked up on the C# documentation. Note that the full name of an attribute like [`Flags`](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute +There are many [predefined and reserved attributes](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/general#conditional-attribute), for example: `Flags`, `Obsolete`, `Conditional`, each has a specific that can be looked up on the C# documentation. Note that the full name of an attribute like [`Flags`](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute) diff --git a/concepts/do-while-loops/about.md b/concepts/do-while-loops/about.md index 7bad094365..8a65e06786 100644 --- a/concepts/do-while-loops/about.md +++ b/concepts/do-while-loops/about.md @@ -1,6 +1,6 @@ # About -To repeatedly execute logic, one can use loops. If the code in a loop should always be executed at least once, a `do/while` loop can be used: +To repeatedly execute logic, one can use loops. If the code in a loop should always be executed at least once, a `do`/`while` loop can be used: ```csharp int x = 0; diff --git a/concepts/do-while-loops/introduction.md b/concepts/do-while-loops/introduction.md index a260254324..82035814d2 100644 --- a/concepts/do-while-loops/introduction.md +++ b/concepts/do-while-loops/introduction.md @@ -1,6 +1,6 @@ # Introduction -A less commonly used alternative to the above syntax is a `do-while` loop: +If the code in a loop should always be executed at least once, a `do`/`while` loop can be used: ```csharp int x = 23; diff --git a/concepts/flag-enums/introduction.md b/concepts/flag-enums/introduction.md index dd69e21dbd..f73aac01f8 100644 --- a/concepts/flag-enums/introduction.md +++ b/concepts/flag-enums/introduction.md @@ -2,7 +2,7 @@ The C# [`enum` type](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum) represents a fixed set of named constants (an enumeration). -Normally, one `enum` member can only refer to exactly one of those named constants. However, sometimes it is useful to refer to more than one constant. To do so, one can annotate the `enum` with the [`Flags` attribute](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute +Normally, one `enum` member can only refer to exactly one of those named constants. However, sometimes it is useful to refer to more than one constant. To do so, one can annotate the `enum` with the [`Flags` attribute](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute) A flags enum can be defined as follows (using binary integer notation `0b`): diff --git a/exercises/concept/attack-of-the-trolls/.docs/introduction.md b/exercises/concept/attack-of-the-trolls/.docs/introduction.md index cde5f879f1..9fd05b23a0 100644 --- a/exercises/concept/attack-of-the-trolls/.docs/introduction.md +++ b/exercises/concept/attack-of-the-trolls/.docs/introduction.md @@ -15,9 +15,9 @@ class MyClass } ``` -This declarative metadata only associates additional structured information to the code and does not modify its behavior, but that metadata is used by other parts of the code to change how its target would behave or add, change or remove, restrict some its functionalities. +This declarative metadata only associates additional structured information to the code and does not modify its behavior, but that metadata is used by other part of the code to change how its target would behave or add, change or remove, restrict some its functionalities. -There is many [predefined and reserved attributes](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/general#conditional-attribute), for example: `Flags`, `Obsolete`, `Conditional`, each has a specific that can be looked up on the C# documentation. Note that the full name of an attribute like [`Flags`](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute) +There are many [predefined and reserved attributes](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/general#conditional-attribute), for example: `Flags`, `Obsolete`, `Conditional`, each has a specific that can be looked up on the C# documentation. Note that the full name of an attribute like [`Flags`](https://docs.microsoft.com/en-us/dotnet/api/system.flagsattribute) ## Flag Enums diff --git a/exercises/concept/interest-is-interesting/.docs/introduction.md b/exercises/concept/interest-is-interesting/.docs/introduction.md index e16f5ee528..948a2113f5 100644 --- a/exercises/concept/interest-is-interesting/.docs/introduction.md +++ b/exercises/concept/interest-is-interesting/.docs/introduction.md @@ -30,7 +30,7 @@ while (x > 10) ## Do While Loops -A less commonly used alternative to the above syntax is a `do-while` loop: +If the code in a loop should always be executed at least once, a `do`/`while` loop can be used: ```csharp int x = 23; diff --git a/exercises/concept/tim-from-marketing/.docs/introduction.md b/exercises/concept/tim-from-marketing/.docs/introduction.md index a1d595fe25..e7aa8ef723 100644 --- a/exercises/concept/tim-from-marketing/.docs/introduction.md +++ b/exercises/concept/tim-from-marketing/.docs/introduction.md @@ -61,10 +61,10 @@ The `??` operator allows one to return a default value when the value is `null`: ```csharp string? name1 = "John"; -name1 ??= "Paul"; // => "John" +name1 ?? "Paul"; // => "John" string? name2 = null; -name2 ??= "George"; // => "George" +name2 ?? "George"; // => "George" ``` The `?.` operator allows one to call members safely on a possibly `null` value: