mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 14:25:37 +00:00
Initial commit
This commit is contained in:
parent
d5bde3c775
commit
5fb8e6929b
33 changed files with 842 additions and 0 deletions
15
vscode/Chapter02/AsyncConsole/AsyncConsole.csproj
Normal file
15
vscode/Chapter02/AsyncConsole/AsyncConsole.csproj
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="System.Console" Static="true" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
7
vscode/Chapter02/AsyncConsole/Program.cs
Normal file
7
vscode/Chapter02/AsyncConsole/Program.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
HttpClient client = new();
|
||||
|
||||
HttpResponseMessage response =
|
||||
await client.GetAsync("http://www.apple.com/");
|
||||
|
||||
WriteLine("Apple's home page has {0:N0} bytes.",
|
||||
response.Content.Headers.ContentLength);
|
||||
Loading…
Add table
Add a link
Reference in a new issue