Skip to content

Conversation

@pkulikov
Copy link
Contributor

@pkulikov pkulikov commented Jul 9, 2018

Separated description of conditions and the example.

Fixes #6369

@pkulikov pkulikov requested a review from BillWagner as a code owner July 9, 2018 18:17
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great set of changes @pkulikov

I had two small comments, and then it's ready to merge.

```csharp
public ref Person GetContactInformation(string fname, string lname);
```
- the method signature includes the [ref](../../language-reference/keywords/ref.md) keyword in front of the return type,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better shown as an unordered list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it already unordered @BillWagner? Or it should be numbered?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh. 👀 weren't seeing the '-' earlier.

Then, just two very small nits: Each should be a sentence, so period after "return type" in the first, instead of a comma, and capitalize "The" and "Each".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! Thank you for review.

- each [return](../../language-reference/keywords/return.md) statement in the method body includes the [ref](../../language-reference/keywords/ref.md) keyword in front of the name of the returned instance.

In addition, the name of the object returned by each [return](../../language-reference/keywords/return.md) statement in the method body must be preceded by the [ref](../../language-reference/keywords/ref.md) keyword. For example, the following `return` statement returns a reference to a `Person` object named `p`:
The following example shows the method that satisfies those conditions and returns a reference to a `Person` object named `p`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change "the method" to "a method"

@BillWagner BillWagner merged commit 9bb467d into dotnet:master Jul 12, 2018
@pkulikov pkulikov deleted the ref-return-update branch July 12, 2018 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants