Skip to content
Closed
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
16 changes: 14 additions & 2 deletions xml/System.Net.Http/HttpClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ If this change is undesirable, you can configure your application to use the old

## Examples
[!code-csharp[System.Net.Http.HttpClient#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.net.http.httpclient/cs/source.cs#1)]
[!code-vb[System.Net.Http.HttpClient#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.net.http.httpclient/vb/source.vb#1)]

The preceding code example uses an `async Task Main()` entry point. That feature requires C# 7.1 or later.

Expand Down Expand Up @@ -165,8 +166,19 @@ public class GoodController : ApiController
HttpClient = new HttpClient();
}
}
```

```
```vb
Copy link
Contributor

Choose a reason for hiding this comment

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

same on line 61. do you want to add there as well?

Public Class GoodController
Inherits ApiController
' OK
Private Shared ReadOnly HttpClient As HttpClient;

Shared Sub New()
HttpClient = New HttpClient()
End sub
End Class
```

]]></format>
</remarks>
Expand Down Expand Up @@ -2244,4 +2256,4 @@ httpClient.Timeout = TimeSpan.FromMinutes(10);
</Docs>
</Member>
</Members>
</Type>
</Type>