Skip to content

Commit

Permalink
Fix introductions (#2198)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Nov 8, 2023
1 parent eff3003 commit 30d99c3
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion concepts/attributes/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion concepts/do-while-loops/about.md
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion concepts/do-while-loops/introduction.md
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion concepts/flag-enums/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`):

Expand Down
4 changes: 2 additions & 2 deletions exercises/concept/attack-of-the-trolls/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions exercises/concept/tim-from-marketing/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 30d99c3

Please sign in to comment.