Skip to content

Commit 988df1e

Browse files
authored
boolean to Boolean (#2311)
1 parent 6bbc8f3 commit 988df1e

File tree

28 files changed

+44
-44
lines changed

28 files changed

+44
-44
lines changed

concepts/arrays/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ foreach (char vowel in vowels)
7979
A `for` loop does have some advantages over a `foreach` loop:
8080

8181
- You can start or stop at the index you want.
82-
- You can use any (boolean) termination condition you want.
82+
- You can use any (Boolean) termination condition you want.
8383
- You can skip elements by customizing the incrementing of the loop variable.
8484
- You can process collections from back to front by counting down.
8585
- You can use `for` loops in scenarios that don't involve collections.

concepts/booleans/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Booleans in C# are represented by the `bool` type, which values can be either `true` or `false`.
44

5-
C# supports four [boolean operators][operators]: `!` (NOT), `&&` (AND), `||` (OR), and `^` (XOR). The `&&` and `||` operators use _short-circuit evaluation_, which means that the right-hand side of the operator is only evaluated when needed.
5+
C# supports four [Boolean operators][operators]: `!` (NOT), `&&` (AND), `||` (OR), and `^` (XOR). The `&&` and `||` operators use _short-circuit evaluation_, which means that the right-hand side of the operator is only evaluated when needed.
66

77
```csharp
88
true || false // => true
@@ -11,7 +11,7 @@ true ^ false // => true
1111
true ^ true // => false
1212
```
1313

14-
The three boolean operators each have a different [_operator precedence_][precedence]. As a consequence, they are evaluated in this order: `not` first, `&&` second, `^` third, and finally `||`. If you want to 'escape' these rules, you can enclose a boolean expression in parentheses (`()`), as the parentheses have an even higher operator precedence.
14+
The three Boolean operators each have a different [_operator precedence_][precedence]. As a consequence, they are evaluated in this order: `not` first, `&&` second, `^` third, and finally `||`. If you want to 'escape' these rules, you can enclose a Boolean expression in parentheses (`()`), as the parentheses have an even higher operator precedence.
1515

1616
```csharp
1717
!true && false // => false

concepts/booleans/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Booleans in C# are represented by the `bool` type, whose values can be either `true` or `false`.
44

5-
C# supports three boolean operators: `!` (NOT), `&&` (AND), and `||` (OR).
5+
C# supports three Boolean operators: `!` (NOT), `&&` (AND), and `||` (OR).

concepts/const-readonly/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ By default, values in C# are _mutable_, that is they can change over time. To ma
77

88
The `const` modifier has some restrictions:
99

10-
1. It can only be applied to "constant" types: strings, booleans and numbers.
10+
1. It can only be applied to "constant" types: strings, Booleans and numbers.
1111
1. The `const` value must be initialized immediately.
1212

1313
See [defining constants][defining-constants] for more information.

concepts/const-readonly/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ By default, values in C# are _mutable_, that is they can change over time. To ma
77

88
The `const` modifier has some restrictions:
99

10-
1. It can only be applied to "constant" types: strings, booleans and numbers.
10+
1. It can only be applied to "constant" types: strings, Booleans and numbers.
1111
1. The `const` value must be initialized immediately.
1212

1313
If your value is a non-constant type or you need to initialize the value in a constructor, `readonly` can be used to enforce immutability.

concepts/enums/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum Priority : byte
4040

4141
## Convert to an Enum member
4242

43-
You should always consider using an enum whenever you want to model something like a boolean. Besides the aforementioned readability benefits, enums have another advantage over booleans: new values can always be added to an enum, whereas a boolean value will only ever be `true` or `false`. Using an enum is thus more future proof.
43+
You should always consider using an enum whenever you want to model something like a Boolean. Besides the aforementioned readability benefits, enums have another advantage over Booleans: new values can always be added to an enum, whereas a Boolean value will only ever be `true` or `false`. Using an enum is thus more future proof.
4444

4545
```csharp
4646
enum Status
@@ -71,7 +71,7 @@ Status status = (Status)Enum.Parse(typeof(Status), input);
7171
// Inactive
7272
```
7373

74-
To check if a name or a value exists in the enum, you can use [`Enum.TryParse`][enum tryparse] or [`Enum.IsDefined`][enum isdefined], both return a boolean indicating if the enum member exists:
74+
To check if a name or a value exists in the enum, you can use [`Enum.TryParse`][enum tryparse] or [`Enum.IsDefined`][enum isdefined], both return a Boolean indicating if the enum member exists:
7575

7676
```csharp
7777
bool doesExist = Enum.IsDefined(typeof(Status), "Inexistent");

concepts/exception-filtering/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# About
22

33
`when` is the keyword in filtering exceptions. It is placed after the catch
4-
statement and can take a boolean expression containing any values in scope at the time. They don't just have to be members of the exception itself. If the type of the exception matches and the expression evaluates to true then the block associated with that `catch` statement is executed otherwise the next `catch` statement, if any, is checked.
4+
statement and can take a Boolean expression containing any values in scope at the time. They don't just have to be members of the exception itself. If the type of the exception matches and the expression evaluates to true then the block associated with that `catch` statement is executed otherwise the next `catch` statement, if any, is checked.
55

66
```csharp
77
try

concepts/exception-filtering/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Introduction
22

33
`when` is the keyword in filtering exceptions. It is placed after the catch
4-
statement and can take a boolean expression containing any values in scope at the time. If the expression evaluates to true then the block associated with that `catch` statement is executed otherwise the next `catch` statement, if any, is checked.
4+
statement and can take a Boolean expression containing any values in scope at the time. If the expression evaluates to true then the block associated with that `catch` statement is executed otherwise the next `catch` statement, if any, is checked.
55

66
```csharp
77
try

concepts/for-loops/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"blurb": "For-loops allow for iteration over a specified range, with a boolean condition to indicate when to stop, and an increment to indicate how much to go up or down by.",
2+
"blurb": "For-loops allow for iteration over a specified range, with a Boolean condition to indicate when to stop, and an increment to indicate how much to go up or down by.",
33
"authors": [
44
"ErikSchierboom"
55
],

concepts/for-loops/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ foreach (char vowel in vowels)
4242
A `for` loop does have some advantages over a `foreach` loop:
4343

4444
- You can start or stop at the index you want.
45-
- You can use any (boolean) termination condition you want.
45+
- You can use any (Boolean) termination condition you want.
4646
- You can skip elements by customizing the incrementing of the loop variable.
4747
- You can process collections from back to front by counting down.
4848
- You can use `for` loops in scenarios that don't involve collections.

0 commit comments

Comments
 (0)