Skip to content

Removed the duplicate list of the article sections #15418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions docs/csharp/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@ A method is a code block that contains a series of statements. A program causes
> [!NOTE]
> This topic discusses named methods. For information about anonymous functions, see [Anonymous Functions](programming-guide/statements-expressions-operators/anonymous-functions.md).

This topic contains the following sections:

- [Method signatures](#signatures)
- [Method invocation](#invocation)
- [Inherited and overridden methods](#inherited)
- [Passing parameters](#passing)
- [Passing parameters by value](#byval)
- [Passing parameters by reference](#byref)
- [Parameter arrays](#paramarray)
- [Optional parameters and arguments](#optional)
- [Return values](#return)
- [Extension methods](#extension)
- [Async Methods](#async)
- [Expression-bodied members](#expr)
- [Iterators](#iterators)

<a name="signatures"></a>

## Method signatures
Expand Down Expand Up @@ -152,7 +136,7 @@ A method definition can specify that its parameters are required or that they ar
The parameter's default value must be assigned by one of the following kinds of expressions:

- A constant, such as a literal string or number.
- An expression of the form `new ValType`, where `ValType` is a value type. Note that this invokes the value type's implicit parameterless constructor, which is not an actual member of the type.
- An expression of the form `new ValType()`, where `ValType` is a value type. Note that this invokes the value type's implicit parameterless constructor, which is not an actual member of the type.
- An expression of the form `default(ValType)`, where `ValType` is a value type.

If a method includes both required and optional parameters, optional parameters are defined at the end of the parameter list, after all required parameters.
Expand Down