Skip to content

Commit eab7de0

Browse files
authored
changed files by pdets auto publish service, publishid[a9d2b645-cdbd-4354-b63f-ad4d89e75336] and do [publish].
1 parent 10e552b commit eab7de0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

learn-pr/wwl-language/csharp-call-methods/includes/3-exercise-call-methods-dotnet-class.md

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

44
Whether you realized it or not, you've been calling C# methods ever since your first "Hello, World!" application. That application uses the `WriteLine()` method of the `Console` class to display the "Hello, World!" message.
55

6-
However, not all classes and methods are implemented the same way. This unit covers some of the most common variants that you'll need to understand when using methods from the .NET Class Library. More importantly, you'll learn how to find and use the documentation to better understand more about each method.
6+
However, not all classes and methods are implemented as the same way. This unit covers some of the most common variants that you'll need to understand when using methods from the .NET Class Library. More importantly, you'll learn how to find and use the documentation to better understand more about each method.
77

88
## How to call methods in the .NET Class Library
99

@@ -140,7 +140,7 @@ A single class can support both stateful and stateless methods. However, when yo
140140
141141
## Creating an instance of a class
142142
143-
An instance of a class is called an *object*. To create a new instance of a class, you use the `new` operator. Consider the following line of code that creates a new instance of the `Random` class to create a new object called `dice`:
143+
An instance of a class is called as an *object*. To create a new instance of a class, you use the `new` operator. Consider the following line of code that creates a new instance of the `Random` class to create a new object called `dice`:
144144
145145
```c#
146146
Random dice = new Random();
@@ -221,4 +221,4 @@ Try accessing the `Random.Next()` method directly and see what happens.
221221
- When calling a stateless method, you don't need to create a new instance of its class first.
222222
- When calling a stateful method, you need to create an instance of the class, and access the method on the object.
223223
- Use the `new` operator to create a new instance of a class.
224-
- An instance of a class is called an *object*.
224+
- An instance of a class is called as an *object*.

learn-pr/wwl-language/csharp-call-methods/includes/4-exercise-return-values-input-parameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ However, ignoring the return value would be pointless. The reason you're calling
4040
When you call a method, you can pass in values that the method will use to complete its task. These values are called **arguments**. The method uses the arguments to assign values to the **parameters** that are defined in the method's signature. A method can require one or more parameters to accomplish its task, or none at all.
4141

4242
> [!NOTE]
43-
> Often times, the terms 'parameter' and 'argument' are used interchangeably. However, 'parameter' refers to the variable that's being used inside the method. An 'argument' is the value that's passed when the method is called.
43+
> Oftentimes, the terms 'parameter' and 'argument' are used interchangeably. However, 'parameter' refers to the variable that's being used inside the method. An 'argument' is the value that's passed when the method is called.
4444
4545
Most methods are designed to accept one or more parameters. The parameters can be used to configure how the method performs its work, or they might be operated on directly. For example, the `Random.Next()` method uses parameters to configure the upper and lower boundaries of the return value. However, the `Console.WriteLine()` uses the parameter directly by printing the value to the console.
4646

@@ -61,7 +61,7 @@ The first code line creates an instance of the `Random` class named `dice`. The
6161
The arguments passed to a method must be the same data type as the corresponding parameters defined by the method. If you attempt to pass an incorrectly typed argument to a method, the C# compiler will catch your mistake and force you to update your calling statement before your code will compile and run. Type checking is one way that C# and .NET use to prevent end-users from experiencing errors at runtime.
6262

6363
> [!NOTE]
64-
> Although parameters are often used, not all methods require parameters to complete their task. For example, the `Console` class includes a `Console.Clear()` method that doesn't use parameters. Since this method is used to clear any information displayed in the console, it doesn't need parameters to complete it's task.
64+
> Although parameters are often used, not all methods require parameters to complete their task. For example, the `Console` class includes a `Console.Clear()` method that doesn't use parameters. Since this method is used to clear any information displayed in the console, it doesn't need parameters to complete its task.
6565
6666
## Overloaded methods
6767

0 commit comments

Comments
 (0)