diff --git a/xml/System.Net.Http/HttpClient.xml b/xml/System.Net.Http/HttpClient.xml index 744f80ad89e..3f30c777971 100644 --- a/xml/System.Net.Http/HttpClient.xml +++ b/xml/System.Net.Http/HttpClient.xml @@ -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. @@ -165,8 +166,19 @@ public class GoodController : ApiController HttpClient = new HttpClient(); } } +``` -``` +```vb +Public Class GoodController + Inherits ApiController + ' OK + Private Shared ReadOnly HttpClient As HttpClient; + + Shared Sub New() + HttpClient = New HttpClient() + End sub +End Class +``` ]]> @@ -2244,4 +2256,4 @@ httpClient.Timeout = TimeSpan.FromMinutes(10); - \ No newline at end of file +