diff --git a/docs/core/compatibility/3.1-5.0.md b/docs/core/compatibility/3.1-5.0.md
index 2b1fd992fee2f..809a5d8beed8e 100644
--- a/docs/core/compatibility/3.1-5.0.md
+++ b/docs/core/compatibility/3.1-5.0.md
@@ -40,8 +40,13 @@ If you're migrating from version 3.1 of .NET Core, ASP.NET Core, or EF Core to v
## Windows Forms
+- [Removed status bar controls](#removed-status-bar-controls)
- [WinForms APIs now throw ArgumentNullException](#winforms-apis-now-throw-argumentnullexception)
+[!INCLUDE [winforms-deprecated-controls](../../../includes/core-changes/windowsforms/5.0/winforms-deprecated-controls.md)]
+
+***
+
[!INCLUDE [null-args-cause-argumentnullexception](../../../includes/core-changes/windowsforms/5.0/null-args-cause-argumentnullexception.md)]
***
diff --git a/docs/core/compatibility/winforms.md b/docs/core/compatibility/winforms.md
index 1e8e9ce269412..743ca8a85df7e 100644
--- a/docs/core/compatibility/winforms.md
+++ b/docs/core/compatibility/winforms.md
@@ -11,6 +11,7 @@ The following breaking changes are documented on this page:
| Breaking change | Version introduced |
| - | :-: |
+| [Removed status bar controls](#removed-status-bar-controls) | 5.0 |
| [WinForms APIs now throw ArgumentNullException](#winforms-apis-now-throw-argumentnullexception) | 5.0 |
| [Removed controls](#removed-controls) | 3.1 |
| [CellFormatting event not raised if tooltip is shown](#cellformatting-event-not-raised-if-tooltip-is-shown) | 3.1 |
@@ -30,6 +31,10 @@ The following breaking changes are documented on this page:
## .NET 5.0
+[!INCLUDE [winforms-deprecated-controls](../../../includes/core-changes/windowsforms/5.0/winforms-deprecated-controls.md)]
+
+***
+
[!INCLUDE [null-args-cause-argumentnullexception](../../../includes/core-changes/windowsforms/5.0/null-args-cause-argumentnullexception.md)]
***
diff --git a/docs/core/docker/build-container.md b/docs/core/docker/build-container.md
index 635f591ad17a4..cd33f1b4cf2c6 100644
--- a/docs/core/docker/build-container.md
+++ b/docs/core/docker/build-container.md
@@ -164,7 +164,7 @@ myapp.deps.json myapp.dll myapp.pdb myapp.runtimeconfig.json
The *Dockerfile* file is used by the `docker build` command to create a container image. This file is a text file named *Dockerfile* that doesn't have an extension.
-In your terminal, navigate up a directory to the working folder you created at the start. Create a file named *Dockerfile* in your working folder and open it in a text editor. Depending on the type of application you're going to containerize, you'll choose either the ASP.NET Core runtime or the .NET Core runtime. When in doubt, choose the ASP.NET Core runtime, which includes the .NET Core runtime. This tutorial will use the ASP.NET Core runtime image, but the application created in the previous sections is an .NET Core application.
+In your terminal, navigate back one directory to the working folder you created at the start. Create a file named *Dockerfile* in your working folder and open it in a text editor. Depending on the type of application you're going to containerize, you'll choose either the ASP.NET Core runtime or the .NET Core runtime. When in doubt, choose the ASP.NET Core runtime, which includes the .NET Core runtime. This tutorial will use the ASP.NET Core runtime image, but the application created in the previous sections is an .NET Core application.
- ASP.NET Core runtime
@@ -214,8 +214,8 @@ Docker will process each line in the *Dockerfile*. The `.` in the `docker build`
```console
> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
-myimage latest 38db0eb8f648 4 weeks ago 346MB
-mcr.microsoft.com/dotnet/core/aspnet 3.1 38db0eb8f648 4 weeks ago 346MB
+myimage latest 54240314fe71 4 weeks ago 346MB
+mcr.microsoft.com/dotnet/core/aspnet 3.1 54240314fe71 4 weeks ago 346MB
```
Notice that the two images share the same **IMAGE ID** value. The value is the same between both images because the only command in the *Dockerfile* was to base the new image on an existing image. Let's add two commands to the *Dockerfile*. Each command creates a new image layer with the final command representing the image the **myimage** repository entry points to.
@@ -223,33 +223,41 @@ Notice that the two images share the same **IMAGE ID** value. The value is the s
```dockerfile
COPY app/bin/Release/netcoreapp3.1/publish/ app/
-ENTRYPOINT ["dotnet", "app/myapp.dll"]
+WORKDIR /app
+
+ENTRYPOINT ["dotnet", "myapp.dll"]
```
The `COPY` command tells Docker to copy the specified folder on your computer to a folder in the container. In this example, the *publish* folder is copied to a folder named *app* in the container.
+The `WORKDIR` command changes the **current directory** inside of the container to *app*.
+
The next command, `ENTRYPOINT`, tells Docker to configure the container to run as an executable. When the container starts, the `ENTRYPOINT` command runs. When this command ends, the container will automatically stop.
From your terminal, run `docker build -t myimage -f Dockerfile .` and when that command finishes, run `docker images`.
```console
> docker build -t myimage -f Dockerfile .
-Sending build context to Docker daemon 1.624MB
-Step 1/3 : FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
- ---> 38db0eb8f648
-Step 2/3 : COPY app/bin/Release/netcoreapp3.1/publish/ app/
- ---> 37873673e468
-Step 3/3 : ENTRYPOINT ["dotnet", "app/myapp.dll"]
- ---> Running in d8deb7b3aa9e
-Removing intermediate container d8deb7b3aa9e
- ---> 0d602ca35c1d
-Successfully built 0d602ca35c1d
+Sending build context to Docker daemon 1.121MB
+Step 1/4 : FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
+ ---> 54240314fe71
+Step 2/4 : COPY app/bin/Release/netcoreapp3.1/publish/ app/
+ ---> 1e05ea8b3ef5
+Step 3/4 : WORKDIR /app
+ ---> Running in 8c8f710e6292
+Removing intermediate container 8c8f710e6292
+ ---> 31575599f7dc
+Step 4/4 : ENTRYPOINT ["dotnet", "myapp.dll"]
+ ---> Running in 93851322fb76
+Removing intermediate container 93851322fb76
+ ---> e496e8b22d02
+Successfully built e496e8b22d02
Successfully tagged myimage:latest
> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
-myimage latest 0d602ca35c1d 4 seconds ago 346MB
-mcr.microsoft.com/dotnet/core/aspnet 3.1 38db0eb8f648 4 weeks ago 346MB
+myimage latest e496e8b22d02 4 seconds ago 346MB
+mcr.microsoft.com/dotnet/core/aspnet 3.1 54240314fe71 4 weeks ago 346MB
```
Each command in the *Dockerfile* generated a layer and created an **IMAGE ID**. The final **IMAGE ID** (yours will be different) is **ddcc6646461b** and next you'll create a container based on this image.
@@ -260,15 +268,15 @@ Now that you have an image that contains your app, you can create a container. Y
```console
> docker create myimage
-ceda87b219a4e55e9ad5d833ee1a7ea4da21b5ea7ce5a7d08f3051152e784944
+9222af24353f42bab6c13e01a0a64ef2c915cad27bdc46ffa32380581de11e91
```
The `docker create` command from above will create a container based on the **myimage** image. The output of that command shows you the **CONTAINER ID** (yours will be different) of the created container. To see a list of *all* containers, use the `docker ps -a` command:
```console
> docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-ceda87b219a4 myimage "dotnet app/myapp.dll" 4 seconds ago Created gallant_lehmann
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+9222af24353f myimage "dotnet myapp.dll" 4 seconds ago Created gallant_lehmann
```
### Manage the container
@@ -282,8 +290,8 @@ The following example uses the `docker start` command to start the container, an
gallant_lehmann
> docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-ceda87b219a4 myimage "dotnet app/myapp.dll" 7 minutes ago Up 8 seconds gallant_lehmann
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+9222af24353f myimage "dotnet myapp.dll" 7 minutes ago Up 8 seconds gallant_lehmann
```
Similarly, the `docker stop` command will stop the container. The following example uses the `docker stop` command to stop the container, and then uses the `docker ps` command to show that no containers are running:
@@ -331,8 +339,8 @@ The following example lists all containers. It then uses the `docker rm` command
```console
> docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-ceda87b219a4 myimage "dotnet app/myapp.dll" 19 minutes ago Exited gallant_lehmann
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+9222af24353f myimage "dotnet myapp.dll" 19 minutes ago Exited gallant_lehmann
> docker rm gallant_lehmann
gallant_lehmann
diff --git a/docs/core/install/dependencies.md b/docs/core/install/dependencies.md
index a57df44c0e32f..7038327935fa3 100644
--- a/docs/core/install/dependencies.md
+++ b/docs/core/install/dependencies.md
@@ -90,7 +90,7 @@ For more information about .NET Core 2.1 supported operating systems, distributi
-### Windows 7 / Vista / 8.1 / Server 2008 R2
+### Windows 7 / Vista / 8.1 / Server 2008 R2 / Server 2012 R2
Additional dependencies are required if you're installing the .NET SDK or runtime on the following Windows versions:
@@ -111,6 +111,10 @@ The requirements above are also required if you come across one of the following
>
> \- or -
>
+> The program can't start because *api-ms-win-cor-timezone-l1-1-0.dll* is missing from your computer. Try reinstalling the program to fix this problem.
+>
+> \- or -
+>
> The library *hostfxr.dll* was found, but loading it from *C:\\\\\hostfxr.dll* failed.
::: zone-end
diff --git a/docs/core/install/includes/package-manager-switcher.md b/docs/core/install/includes/package-manager-switcher.md
index 8f492d1d008f0..4e4a756f3fb39 100644
--- a/docs/core/install/includes/package-manager-switcher.md
+++ b/docs/core/install/includes/package-manager-switcher.md
@@ -1,6 +1,7 @@
> [!div class="op_single_selector"]
>
+> - [Ubuntu 20.04 - x64](../linux-package-manager-ubuntu-2004.md)
> - [Ubuntu 19.10 - x64](../linux-package-manager-ubuntu-1910.md)
> - [Ubuntu 19.04 - x64](../linux-package-manager-ubuntu-1904.md)
> - [Ubuntu 18.04 - x64](../linux-package-manager-ubuntu-1804.md)
diff --git a/docs/core/install/linux-package-manager-ubuntu-1910.md b/docs/core/install/linux-package-manager-ubuntu-1910.md
index 138ec3e7af00f..20ac4d9a2edd6 100644
--- a/docs/core/install/linux-package-manager-ubuntu-1910.md
+++ b/docs/core/install/linux-package-manager-ubuntu-1910.md
@@ -95,7 +95,7 @@ If that doesn't work, you can run a manual install with the following commands.
```bash
sudo apt-get install -y gpg
-wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
+wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/ubuntu/19.10/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
diff --git a/docs/core/install/linux-package-manager-ubuntu-2004.md b/docs/core/install/linux-package-manager-ubuntu-2004.md
new file mode 100644
index 0000000000000..bdb85b5445f1d
--- /dev/null
+++ b/docs/core/install/linux-package-manager-ubuntu-2004.md
@@ -0,0 +1,111 @@
+---
+title: Install .NET Core on Ubuntu 20.04 package manager - .NET Core
+description: Use a package manager to install .NET Core SDK and runtime on Ubuntu 20.04.
+author: thraka
+ms.author: adegeo
+ms.date: 04/15/2020
+---
+
+# Ubuntu 20.04 Package Manager - Install .NET Core
+
+[!INCLUDE [package-manager-switcher](./includes/package-manager-switcher.md)]
+
+This article describes how to use a package manager to install .NET Core on Ubuntu 20.04.
+
+[!INCLUDE [package-manager-intro-sdk-vs-runtime](includes/package-manager-intro-sdk-vs-runtime.md)]
+
+## Add Microsoft repository key and feed
+
+Before installing .NET, you'll need to:
+
+- Add the Microsoft package signing key to the list of trusted keys.
+- Add the repository to the package manager.
+- Install required dependencies.
+
+This only needs to be done once per machine.
+
+Open a terminal and run the following commands.
+
+```bash
+wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+sudo dpkg -i packages-microsoft-prod.deb
+```
+
+## Install the .NET Core SDK
+
+Update the products available for installation, then install the .NET Core SDK. In your terminal, run the following commands.
+
+```bash
+sudo apt-get update
+sudo apt-get install apt-transport-https
+sudo apt-get update
+sudo apt-get install dotnet-sdk-3.1
+```
+
+> [!IMPORTANT]
+> If you receive an error message similar to **Unable to locate package dotnet-sdk-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
+
+## Install the ASP.NET Core runtime
+
+Update the products available for installation, then install the ASP.NET Core runtime. In your terminal, run the following commands.
+
+```bash
+sudo apt-get update
+sudo apt-get install apt-transport-https
+sudo apt-get update
+sudo apt-get install aspnetcore-runtime-3.1
+```
+
+> [!IMPORTANT]
+> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
+
+## Install the .NET Core runtime
+
+Update the products available for installation, then install the .NET Core runtime. In your terminal, run the following commands.
+
+```bash
+sudo apt-get update
+sudo apt-get install apt-transport-https
+sudo apt-get update
+sudo apt-get install dotnet-runtime-3.1
+```
+
+> [!IMPORTANT]
+> If you receive an error message similar to **Unable to locate package dotnet-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
+
+## How to install other versions
+
+[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)]
+
+## Troubleshoot the package manager
+
+This section provides information on common errors you may get while using the package manager to install .NET Core.
+
+### Unable to locate
+
+If you receive an error message similar to **Unable to locate package {the .NET Core package}**, run the following commands.
+
+```bash
+sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
+sudo apt-get update
+sudo apt-get install {the .NET Core package}
+```
+
+If that doesn't work, you can run a manual install with the following commands.
+
+```bash
+sudo apt-get install -y gpg
+wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
+sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
+wget https://packages.microsoft.com/config/ubuntu/20.04/prod.list
+sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
+sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
+sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
+sudo apt-get install -y apt-transport-https
+sudo apt-get update
+sudo apt-get install {the .NET Core package}
+```
+
+### Failed to fetch
+
+[!INCLUDE [package-manager-failed-to-fetch-deb](includes/package-manager-failed-to-fetch-deb.md)]
diff --git a/docs/core/toc.yml b/docs/core/toc.yml
index 0a7aa4bc8359f..41b4d29dfdf70 100644
--- a/docs/core/toc.yml
+++ b/docs/core/toc.yml
@@ -20,6 +20,8 @@
href: install/how-to-detect-installed-versions.md
- name: Linux package managers
items:
+ - name: Ubuntu 20.04
+ href: install/linux-package-manager-ubuntu-2004.md
- name: Ubuntu 19.10
href: install/linux-package-manager-ubuntu-1910.md
- name: Ubuntu 19.04
diff --git a/docs/csharp/language-reference/operators/await.md b/docs/csharp/language-reference/operators/await.md
index 73daac3a11191..9adf05a9e8294 100644
--- a/docs/csharp/language-reference/operators/await.md
+++ b/docs/csharp/language-reference/operators/await.md
@@ -10,7 +10,7 @@ ms.assetid: 50725c24-ac76-4ca7-bca1-dd57642ffedb
---
# await operator (C# reference)
-The `await` operator suspends evaluation of the enclosing [async](../keywords/async.md) method until the asynchronous operation represented by its operand completes. When the asynchronous operation completes, the `await` operator returns the result of the operation, if any. When the `await` operator is applied to the operand that represents already completed operation, it returns the result of the operation immediately without suspension of the enclosing method. The `await` operator doesn't block the thread that evaluates the async method. When the `await` operator suspends the enclosing async method, the control returns to the caller of the method.
+The `await` operator suspends evaluation of the enclosing [async](../keywords/async.md) method until the asynchronous operation represented by its operand completes. When the asynchronous operation completes, the `await` operator returns the result of the operation, if any. When the `await` operator is applied to the operand that represents an already completed operation, it returns the result of the operation immediately without suspension of the enclosing method. The `await` operator doesn't block the thread that evaluates the async method. When the `await` operator suspends the enclosing async method, the control returns to the caller of the method.
In the following example, the method returns the `Task` instance, which represents an asynchronous operation that produces a byte array when it completes. Until the operation completes, the `await` operator suspends the `DownloadDocsMainPageAsync` method. When `DownloadDocsMainPageAsync` gets suspended, control is returned to the `Main` method, which is the caller of `DownloadDocsMainPageAsync`. The `Main` method executes until it needs the result of the asynchronous operation performed by the `DownloadDocsMainPageAsync` method. When gets all the bytes, the rest of the `DownloadDocsMainPageAsync` method is evaluated. After that, the rest of the `Main` method is evaluated.
diff --git a/docs/csharp/language-reference/operators/switch-expression.md b/docs/csharp/language-reference/operators/switch-expression.md
index 22ad447db47a1..72e4ea8b6d27a 100644
--- a/docs/csharp/language-reference/operators/switch-expression.md
+++ b/docs/csharp/language-reference/operators/switch-expression.md
@@ -18,7 +18,7 @@ The preceding sample shows the basic elements of a switch expression:
- The *range expression*: The preceding example uses the variable `direction` as the range expression.
- The *switch expression arms*: Each switch expression arm contains a *pattern*, an optional *case guard*, the `=>` token, and an *expression*.
-The result of the *switch expression* is the value of the expression of the first *switch expression arm* whose *pattern* matches the *range expression* and whose *cause guard*, if present, evaluates to `true`. The *expression* on the right of the `=>` token can't be an expression statement.
+The result of the *switch expression* is the value of the expression of the first *switch expression arm* whose *pattern* matches the *range expression* and whose *case guard*, if present, evaluates to `true`. The *expression* on the right of the `=>` token can't be an expression statement.
The *switch expression arms* are evaluated in text order. The compiler issues an error when a lower *switch expression arm* can't be chosen because a higher *switch expression arm* matches all its values.
diff --git a/docs/csharp/programming-guide/unsafe-code-pointers/fixed-size-buffers.md b/docs/csharp/programming-guide/unsafe-code-pointers/fixed-size-buffers.md
index 8b56660124b64..746c507d03821 100644
--- a/docs/csharp/programming-guide/unsafe-code-pointers/fixed-size-buffers.md
+++ b/docs/csharp/programming-guide/unsafe-code-pointers/fixed-size-buffers.md
@@ -1,7 +1,7 @@
---
title: "Fixed Size Buffers - C# Programming Guide"
-ms.date: 04/20/2018
-helpviewer_keywords:
+ms.date: 04/23/2020
+helpviewer_keywords:
- "fixed size buffers [C#]"
- "unsafe buffers [C#]"
- "unsafe code [C#], fixed size buffers"
@@ -32,15 +32,39 @@ The preceding example demonstrates accessing `fixed` fields without pinning, wh
Another common fixed-size array is the [bool](../../language-reference/builtin-types/bool.md) array. The elements in a `bool` array are always one byte in size. `bool` arrays are not appropriate for creating bit arrays or buffers.
-> [!NOTE]
-> Except for memory created by using [stackalloc](../../language-reference/operators/stackalloc.md), the C# compiler and the common language runtime (CLR) do not perform any security buffer overrun checks. As with all unsafe code, use caution.
+Fixed size buffers are compiled with the , which instructs the common language runtime (CLR) that a type contains an unmanaged array that can potentially overflow. This is similar to memory created using [stackalloc](../../language-reference/operators/stackalloc.md), which automatically enables buffer overrun detection features in the CLR. The previous example shows how a fixed size buffer could exist in an `unsafe struct`.
-Unsafe buffers differ from regular arrays in the following ways:
+```csharp
+internal unsafe struct Buffer
+{
+ public fixed char fixedBuffer[128];
+}
+```
+
+The compiler generated C# for `Buffer`, is attributed as follows:
+
+```csharp
+internal struct Buffer
+{
+ [StructLayout(LayoutKind.Sequential, Size = 256)]
+ [CompilerGenerated]
+ [UnsafeValueType]
+ public struct e__FixedBuffer
+ {
+ public char FixedElementField;
+ }
+
+ [FixedBuffer(typeof(char), 128)]
+ public e__FixedBuffer fixedBuffer;
+}
+```
+
+Fixed size buffers differ from regular arrays in the following ways:
-- You can only use unsafe buffers in an unsafe context.
-- Unsafe buffers are always vectors, or one-dimensional arrays.
-- The declaration of the array should include a count, such as `char id[8]`. You cannot use `char id[]`.
-- Unsafe buffers can only be instance fields of structs in an unsafe context.
+- May only be used in an [unsafe](../../language-reference/keywords/unsafe.md) context.
+- May only be instance fields of structs.
+- They're always vectors, or one-dimensional arrays.
+- The declaration should include the length, such as `fixed char id[8]`. You cannot use `fixed char id[]`.
## See also
diff --git a/docs/csharp/tour-of-csharp/index.md b/docs/csharp/tour-of-csharp/index.md
index b36d913dd140b..fb918d10608bd 100644
--- a/docs/csharp/tour-of-csharp/index.md
+++ b/docs/csharp/tour-of-csharp/index.md
@@ -35,7 +35,7 @@ dotnet run
The program produces the following output:
-```console
+```dotnetcli
Hello, World!
```
diff --git a/docs/csharp/tour-of-csharp/program-structure.md b/docs/csharp/tour-of-csharp/program-structure.md
index 7b015500a799a..afeb04421f7c3 100644
--- a/docs/csharp/tour-of-csharp/program-structure.md
+++ b/docs/csharp/tour-of-csharp/program-structure.md
@@ -11,7 +11,7 @@ The key organizational concepts in C# are ***programs***, ***namespaces***, ***t
You can create a library project named *acme* using the `dotnet new` command:
-```console
+```dotnetcli
dotnet new classlib -o acme
```
@@ -21,7 +21,7 @@ In that project, declare a class named `Stack` in a namespace called `Acme.Colle
The fully qualified name of this class is `Acme.Collections.Stack`. The class contains several members: a field named `top`, two methods named `Push` and `Pop`, and a nested class named `Entry`. The `Entry` class further contains three members: a field named `next`, a field named `data`, and a constructor. The command:
-```console
+```dotnetcli
dotnet build
```
@@ -43,7 +43,7 @@ The *csproj* file for the preceding program's project must include a reference n
After that addition, `dotnet build` creates an executable assembly named `example.exe`, which, when run, produces the output:
-```console
+```dotnetcli
100
10
1
diff --git a/docs/csharp/tour-of-csharp/types-and-variables.md b/docs/csharp/tour-of-csharp/types-and-variables.md
index 161387fd572d3..20e4799a644e3 100644
--- a/docs/csharp/tour-of-csharp/types-and-variables.md
+++ b/docs/csharp/tour-of-csharp/types-and-variables.md
@@ -1,7 +1,7 @@
---
title: C# Types and Variables - A tour of the C# language
description: Learn about defining types and declaring variables in C#
-ms.date: 02/25/2020
+ms.date: 04/24/2020
ms.assetid: f8a8051e-0049-43f1-b594-9c84cc7b1224
---
@@ -9,9 +9,9 @@ ms.assetid: f8a8051e-0049-43f1-b594-9c84cc7b1224
There are two kinds of types in C#: *value types* and *reference types*. Variables of value types directly contain their data whereas variables of reference types store references to their data, the latter being known as objects. With reference types, it's possible for two variables to reference the same object and thus possible for operations on one variable to affect the object referenced by the other variable. With value types, the variables each have their own copy of the data, and it isn't possible for operations on one to affect the other (except for `ref` and `out` parameter variables).
-C#’s value types are further divided into *simple types*, *enum types*, *struct types*, and *nullable value types*. C#’s reference types are further divided into *class types*, *interface types*, *array types*, and *delegate types*.
+C#'s value types are further divided into *simple types*, *enum types*, *struct types*, and *nullable value types*. C#'s reference types are further divided into *class types*, *interface types*, *array types*, and *delegate types*.
-The following outline provides an overview of C#’s type system.
+The following outline provides an overview of C#'s type system.
- [Value types][ValueTypes]
- [Simple types][SimpleTypes]
@@ -27,6 +27,8 @@ The following outline provides an overview of C#’s type system.
- User-defined types of the form `struct S {...}`
- [Nullable value types][NullableTypes]
- Extensions of all other value types with a `null` value
+ - [Tuple value types][TupleTypes]
+ - User-defined types of the form `(T1, T2, ...)`
- [Reference types][ReferenceTypes]
- [Class types][ClassTypes]
- Ultimate base class of all other types: `object`
@@ -44,6 +46,7 @@ The following outline provides an overview of C#’s type system.
[EnumTypes]: ../language-reference/builtin-types/enum.md
[StructTypes]: ../language-reference/builtin-types/struct.md
[NullableTypes]: ../language-reference/builtin-types/nullable-value-types.md
+[TupleTypes]: ../tuples.md
[ReferenceTypes]: ../language-reference/keywords/reference-types.md
[ClassTypes]: ../language-reference/keywords/class.md
[InterfaceTypes]: ../language-reference/keywords/interface.md
@@ -52,17 +55,17 @@ The following outline provides an overview of C#’s type system.
For more information about numeric types, see [Integral types](../language-reference/builtin-types/integral-numeric-types.md) and [Floating-point types table](../language-reference/builtin-types/floating-point-numeric-types.md).
-C#’s `bool` type is used to represent Boolean values—values that are either `true` or `false`.
+C#'s `bool` type is used to represent Boolean values—values that are either `true` or `false`.
Character and string processing in C# uses Unicode encoding. The `char` type represents a UTF-16 code unit, and the `string` type represents a sequence of UTF-16 code units.
-C# programs use *type declarations* to create new types. A type declaration specifies the name and the members of the new type. Five of C#’s categories of types are user-definable: class types, struct types, interface types, enum types, and delegate types.
+C# programs use *type declarations* to create new types. A type declaration specifies the name and the members of the new type. Five of C#'s categories of types are user-definable: class types, struct types, interface types, enum types, and delegate types.
A `class` type defines a data structure that contains data members (fields) and function members (methods, properties, and others). Class types support single inheritance and polymorphism, mechanisms whereby derived classes can extend and specialize base classes.
A `struct` type is similar to a class type in that it represents a structure with data members and function members. However, unlike classes, structs are value types and don't typically require heap allocation. Struct types don't support user-specified inheritance, and all struct types implicitly inherit from type `object`.
-An `interface` type defines a contract as a named set of public function members. A `class` or `struct` that implements an `interface` must provide implementations of the interface’s function members. An `interface` may inherit from multiple base interfaces, and a `class` or `struct` may implement multiple interfaces.
+An `interface` type defines a contract as a named set of public function members. A `class` or `struct` that implements an `interface` must provide implementations of the interface's function members. An `interface` may inherit from multiple base interfaces, and a `class` or `struct` may implement multiple interfaces.
A `delegate` type represents references to methods with a particular parameter list and return type. Delegates make it possible to treat methods as entities that can be assigned to variables and passed as parameters. Delegates are analogous to function types provided by functional languages. They're also similar to the concept of function pointers found in some other languages. Unlike function pointers, delegates are object-oriented and type-safe.
@@ -74,13 +77,13 @@ C# supports single- and multi-dimensional arrays of any type. Unlike the types l
Nullable value types also don't have to be declared before they can be used. For each non-nullable value type `T`, there is a corresponding nullable value type `T?`, which can hold an additional value, `null`. For instance, `int?` is a type that can hold any 32-bit integer or the value `null`.
-C#’s type system is unified such that a value of any type can be treated as an `object`. Every type in C# directly or indirectly derives from the `object` class type, and `object` is the ultimate base class of all types. Values of reference types are treated as objects simply by viewing the values as type `object`. Values of value types are treated as objects by performing *boxing* and *unboxing operations*. In the following example, an `int` value is converted to `object` and back again to `int`.
+C#'s type system is unified such that a value of any type can be treated as an `object`. Every type in C# directly or indirectly derives from the `object` class type, and `object` is the ultimate base class of all types. Values of reference types are treated as objects simply by viewing the values as type `object`. Values of value types are treated as objects by performing *boxing* and *unboxing operations*. In the following example, an `int` value is converted to `object` and back again to `int`.
[!code-csharp[Boxing](../../../samples/snippets/csharp/tour/types-and-variables/Program.cs#L1-L10)]
When a value of a value type is assigned to an `object` reference, a "box" is allocated to hold the value. That box is an instance of a reference type, and the value is copied into that box. Conversely, when an `object` reference is cast to a value type, a check is made that the referenced `object` is a box of the correct value type. If the check succeeds, the value in the box is copied to the value type.
-C#’s unified type system effectively means that value types are treated as `object` references "on demand." Because of the unification, general-purpose libraries that use type `object` can be used with all types that derive from `object`, including both reference types and value types.
+C#'s unified type system effectively means that value types are treated as `object` references "on demand." Because of the unification, general-purpose libraries that use type `object` can be used with all types that derive from `object`, including both reference types and value types.
There are several kinds of *variables* in C#, including fields, array elements, local variables, and parameters. Variables represent storage locations, and every variable has a type that determines what values can be stored in the variable, as shown below.
diff --git a/docs/framework/wcf/samples/custom-service-host.md b/docs/framework/wcf/samples/custom-service-host.md
index 27ad860bd36e1..1c107de90e6a6 100644
--- a/docs/framework/wcf/samples/custom-service-host.md
+++ b/docs/framework/wcf/samples/custom-service-host.md
@@ -140,7 +140,7 @@ public class SelfDescribingServiceHostFactory : ServiceHostFactory
To use a custom factory with a service implementation, we must add some additional metadata to the service’s .svc file.
```xml
-<%@ServiceHost Service="Microsoft.ServiceModel.Samples.CalculatorService"
+<% @ServiceHost Service="Microsoft.ServiceModel.Samples.CalculatorService"
Factory="Microsoft.ServiceModel.Samples.SelfDescribingServiceHostFactory"
language=c# Debug="true" %>
```
diff --git a/docs/framework/wcf/samples/discovery-security-sample.md b/docs/framework/wcf/samples/discovery-security-sample.md
index 5ffe7047d5347..e5ff72b133386 100644
--- a/docs/framework/wcf/samples/discovery-security-sample.md
+++ b/docs/framework/wcf/samples/discovery-security-sample.md
@@ -40,7 +40,7 @@ The Discovery specification does not require that endpoints that participate in
The secure channel listener creates input or duplex channels that verify the compact signature in received messages. To verify the signature, the `KeyId` specified in the compact signature attached to the message is used to select a certificate from the specified store. If the message does not have a signature or the signature check fails, the messages are dropped. To use the secure binding, the sample defines a factory that creates custom and with the added discovery secure binding element. These secure endpoints can be used in discovery announcement listeners and discoverable services.
## Sample Details
- The sample includes a library and 4 console applications:
+ The sample includes a library and 4 console applications:
- **DiscoverySecurityChannels**: A library that exposes the secure binding. The library computes and verifies the compact signature for outgoing/incoming messages.
diff --git a/docs/framework/wcf/samples/durable-instance-context.md b/docs/framework/wcf/samples/durable-instance-context.md
index e6ecf24f35561..5fdb00d61ce37 100644
--- a/docs/framework/wcf/samples/durable-instance-context.md
+++ b/docs/framework/wcf/samples/durable-instance-context.md
@@ -395,6 +395,7 @@ Client applications must add the DurableInstanceContextChannel into the channel
type="Microsoft.ServiceModel.Samples.DurableInstanceContextBindingElementSection, DurableInstanceContextExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
+
```
Now the binding element can be used with a custom binding just like other standard binding elements:
diff --git a/docs/framework/wcf/samples/extending-tracing.md b/docs/framework/wcf/samples/extending-tracing.md
index d7e0b4904c3e3..50b138e9ebb24 100644
--- a/docs/framework/wcf/samples/extending-tracing.md
+++ b/docs/framework/wcf/samples/extending-tracing.md
@@ -57,8 +57,8 @@ This sample demonstrates how to extend the Windows Communication Foundation (WCF
-....
-....
+
+....
```
### Correlating Activities
diff --git a/docs/framework/wcf/samples/security-validation.md b/docs/framework/wcf/samples/security-validation.md
index cae7f703f8257..c78a8ecd43693 100644
--- a/docs/framework/wcf/samples/security-validation.md
+++ b/docs/framework/wcf/samples/security-validation.md
@@ -49,8 +49,9 @@ public void Validate(ServiceDescription serviceDescription,
-
-...
+
+ ...
+
```
Once the behavior extension is added to the service, it is now possible to add the `endpointValidate` behavior to the list of behaviors in the Web.config file and thus, to the service.
diff --git a/docs/framework/wcf/samples/sessions-and-queues.md b/docs/framework/wcf/samples/sessions-and-queues.md
index 330524755c857..f85d66e3cf7b6 100644
--- a/docs/framework/wcf/samples/sessions-and-queues.md
+++ b/docs/framework/wcf/samples/sessions-and-queues.md
@@ -129,7 +129,7 @@ public static void Main()
...
-
+
```
The client creates a transaction scope. All messages in the session are sent to the queue within the transaction scope, causing it to be treated as an atomic unit where all messages succeed or fail. The transaction is committed by calling .
diff --git a/docs/framework/wcf/samples/stand-alone-diagnostics-feed-sample.md b/docs/framework/wcf/samples/stand-alone-diagnostics-feed-sample.md
index b279e2304cd57..780d741a8872e 100644
--- a/docs/framework/wcf/samples/stand-alone-diagnostics-feed-sample.md
+++ b/docs/framework/wcf/samples/stand-alone-diagnostics-feed-sample.md
@@ -40,7 +40,7 @@ WebServiceHost host = new WebServiceHost(typeof(ProcessService), new Uri("http:/
Alternatively, you can use from within an IIS-hosted .svc file to provide equivalent functionality (this technique is not demonstrated in this sample code).
```xml
-<%@ ServiceHost Language="C#|VB" Debug="true" Service="ProcessService" %>
+<% @ServiceHost Language="C#|VB" Debug="true" Service="ProcessService" %>
```
Because this service receives requests using the standard HTTP GET, you can use any RSS or ATOM-aware client to access the service. For example, you can view the output of this service by navigating to `http://localhost:8000/diagnostics/feed/?format=atom` or `http://localhost:8000/diagnostics/feed/?format=rss` in an RSS-aware browser.
diff --git a/docs/framework/wcf/samples/transport-udp.md b/docs/framework/wcf/samples/transport-udp.md
index f88251d762a94..e179991fe8992 100644
--- a/docs/framework/wcf/samples/transport-udp.md
+++ b/docs/framework/wcf/samples/transport-udp.md
@@ -168,7 +168,7 @@ if (soapBinding != null)
-
+
@@ -307,7 +307,7 @@ if (context.Endpoint.Binding is CustomBinding)
-
@@ -363,7 +363,7 @@ protected override void OnApplyConfiguration(string configurationName)
-
diff --git a/docs/framework/wcf/samples/unwrapped-messages.md b/docs/framework/wcf/samples/unwrapped-messages.md
index fc686f2133eeb..0c617f440bdd1 100644
--- a/docs/framework/wcf/samples/unwrapped-messages.md
+++ b/docs/framework/wcf/samples/unwrapped-messages.md
@@ -36,7 +36,6 @@ This sample demonstrates unwrapped messages. By default, the message body is for
15.99
-
```
The unwrapped message does not wrap the `n1` and `n2` parameters in a containing element, they are direct children of the soap body element.
diff --git a/docs/framework/wcf/samples/user-name-password-validator.md b/docs/framework/wcf/samples/user-name-password-validator.md
index c70ef89398045..9f32c48a4702b 100644
--- a/docs/framework/wcf/samples/user-name-password-validator.md
+++ b/docs/framework/wcf/samples/user-name-password-validator.md
@@ -236,6 +236,7 @@ serviceHost.Credentials. UserNameAuthentication.CustomUserNamePasswordValidator
-->
...
+
diff --git a/docs/framework/wcf/samples/x-509-certificate-validator.md b/docs/framework/wcf/samples/x-509-certificate-validator.md
index 1e9dffd6345b1..2f21d870dff1c 100644
--- a/docs/framework/wcf/samples/x-509-certificate-validator.md
+++ b/docs/framework/wcf/samples/x-509-certificate-validator.md
@@ -236,6 +236,7 @@ serviceHost.Credentials.ClientCertificate.Authentication.CustomCertificateValida
customCertificateValidatorType =
"Microsoft.ServiceModel.Samples. CustomX509CertificateValidator, service" />
+
...
diff --git a/docs/framework/wpf/advanced/colorconvertedbitmap-markup-extension.md b/docs/framework/wpf/advanced/colorconvertedbitmap-markup-extension.md
index fc61edae2cc6f..95b42f550be6b 100644
--- a/docs/framework/wpf/advanced/colorconvertedbitmap-markup-extension.md
+++ b/docs/framework/wpf/advanced/colorconvertedbitmap-markup-extension.md
@@ -12,7 +12,7 @@ Provides a way to specify a bitmap source that does not have an embedded profile
## XAML Attribute Usage
```xml
-
+
```
## XAML Values
diff --git a/docs/framework/wpf/advanced/componentresourcekey-markup-extension.md b/docs/framework/wpf/advanced/componentresourcekey-markup-extension.md
index 274c08a6d7a49..5ec7c2523be52 100644
--- a/docs/framework/wpf/advanced/componentresourcekey-markup-extension.md
+++ b/docs/framework/wpf/advanced/componentresourcekey-markup-extension.md
@@ -15,25 +15,25 @@ Defines and references keys for resources that are loaded from external assembli
## XAML Attribute Usage (setting key, compact)
```xml
-
+
```
## XAML Attribute Usage (setting key, verbose)
```xml
-
+
```
## XAML Attribute Usage (requesting resource, compact)
```xml
-
+
```
## XAML Attribute Usage (requesting resource, verbose)
```xml
-
+
```
## XAML Values
diff --git a/docs/framework/wpf/advanced/dynamicresource-markup-extension.md b/docs/framework/wpf/advanced/dynamicresource-markup-extension.md
index 9f670fb8f1ec6..2ba39943fb6dc 100644
--- a/docs/framework/wpf/advanced/dynamicresource-markup-extension.md
+++ b/docs/framework/wpf/advanced/dynamicresource-markup-extension.md
@@ -15,7 +15,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
## XAML Attribute Usage
```xml
-
+
```
## XAML Property Element Usage
@@ -23,7 +23,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
```xml
```
@@ -57,7 +57,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
`DynamicResource` can also be used in a verbose attribute usage that specifies the property as a property=value pair:
```xml
-
+
```
The verbose usage is often useful for extensions that have more than one settable property, or if some properties are optional. Because `DynamicResource` has only one settable property, which is required, this verbose usage is not typical.
diff --git a/docs/framework/wpf/advanced/packaging-fonts-with-applications.md b/docs/framework/wpf/advanced/packaging-fonts-with-applications.md
index 084d98d2abd8f..5e030819ec4a7 100644
--- a/docs/framework/wpf/advanced/packaging-fonts-with-applications.md
+++ b/docs/framework/wpf/advanced/packaging-fonts-with-applications.md
@@ -133,7 +133,7 @@ This topic provides an overview of how to package fonts with your [!INCLUDE[TLA#
library
...
-...
+...
diff --git a/docs/framework/wpf/advanced/propertypath-xaml-syntax.md b/docs/framework/wpf/advanced/propertypath-xaml-syntax.md
index 8d221d603d031..44612d861722a 100644
--- a/docs/framework/wpf/advanced/propertypath-xaml-syntax.md
+++ b/docs/framework/wpf/advanced/propertypath-xaml-syntax.md
@@ -35,7 +35,7 @@ A key to understanding property paths in data binding is that you can target the
### Single Property on the Immediate Object as Data Context
```xml
-
+
```
*propertyName* must resolve to be the name of a property that is in the current for a usage. If your binding updates the source, that property must be read/write and the source object must be mutable.
@@ -45,7 +45,7 @@ A key to understanding property paths in data binding is that you can target the
### Single Indexer on the Immediate Object as Data Context
```xml
-
+
```
`key` must be either the typed index to a dictionary or hash table, or the integer index of an array. Also, the value of the key must be a type that is directly bindable to the property where it is applied. For instance, a hash table that contains string keys and string values can be used this way to bind to Text for a . Or, if the key points to a collection or subindex, you could use this syntax to bind to a target collection property. Otherwise, you need to reference a specific property, through a syntax such as ``.
@@ -57,7 +57,7 @@ You can specify the type of the index if necessary. For details on this aspect o
### Multiple Property (Indirect Property Targeting)
```xml
-
+
```
`propertyName` must resolve to be the name of a property that is the current . The path properties `propertyName` and `propertyName2` can be any properties that exist in a relationship, where `propertyName2` is a property that exists on the type that is the value of `propertyName`.
@@ -67,7 +67,7 @@ You can specify the type of the index if necessary. For details on this aspect o
### Single Property, Attached or Otherwise Type-Qualified
```xml
-
+
```
The parentheses indicate that this property in a should be constructed using a partial qualification. It can use an XML namespace to find the type with an appropriate mapping. The `ownerType` searches types that a [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharptla-xaml-md.md)] processor has access to, through the declarations in each assembly. Most applications have the default XML namespace mapped to the `http://schemas.microsoft.com/winfx/2006/xaml/presentation` namespace, so a prefix is usually only necessary for custom types or types otherwise outside that namespace. `propertyName` must resolve to be the name of a property existing on the `ownerType`. This syntax is generally used for one of the following cases:
@@ -85,7 +85,7 @@ For use as storyboard target, the property specified as `propertyName` must be a
### Source Traversal (Binding to Hierarchies of Collections)
```xml
-
+
```
The / in this syntax is used to navigate within a hierarchical data source object, and multiple steps into the hierarchy with successive / characters are supported. The source traversal accounts for the current record pointer position, which is determined by synchronizing the data with the UI of its view. For details on binding with hierarchical data source objects, and the concept of current record pointer in data binding, see [Use the Master-Detail Pattern with Hierarchical Data](../data/how-to-use-the-master-detail-pattern-with-hierarchical-data.md) or [Data Binding Overview](../../../desktop-wpf/data/data-binding-overview.md).
@@ -104,13 +104,13 @@ To reference the current record pointer for a collection view or master detail d
### Multiple Indexers
```xaml
-
+
```
or
```xaml
-
+
```
If a given object supports multiple indexers, those indexers can be specified in order, similar to an array referencing syntax. The object in question can be either the current context or the value of a property that contains a multiple index object.
@@ -124,7 +124,7 @@ By default, the indexer values are typed by using the characteristics of the und
Each of the syntaxes shown above can be interspersed. For instance, the following is an example that creates a property path to the color at a particular x,y of a `ColorGrid` property that contains a pixel grid array of objects:
```xml
-
+
```
### Escapes for Property Path Strings
@@ -169,7 +169,7 @@ In order to support cloning for animating a that
### Single Property on the Target Object
```xml
-
+
```
`propertyName` must resolve to be the name of a dependency property that exists on the specified type.
@@ -179,7 +179,7 @@ In order to support cloning for animating a that
### Indirect Property Targeting
```xml
-
+
```
`propertyName` must be a property that is either a value type or a primitive, which exists on the specified type.
@@ -195,7 +195,7 @@ For instance, the property of
### Attached Properties
```xml
-
+
```
The parentheses indicate that this property in a should be constructed using a partial qualification. It can use an XML namespace to find the type. The `ownerType` searches types that a [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharptla-xaml-md.md)] processor has access to, through the declarations in each assembly. Most applications have the default XML namespace mapped to the `http://schemas.microsoft.com/winfx/2006/xaml/presentation` namespace, so a prefix is usually only necessary for custom types or types otherwise outside that namespace. `propertyName` must resolve to be the name of a property existing on the `ownerType`. The property specified as `propertyName` must be a . (All [!INCLUDE[TLA2#tla_winclient](../../../../includes/tla2sharptla-winclient-md.md)] attached properties are implemented as dependency properties, so this issue is only of concern for custom attached properties.)
@@ -205,7 +205,7 @@ The parentheses indicate that this property in a
+
```
Most dependency properties or types do not support an indexer. Therefore, the only usage for an indexer in an animation path is at an intermediate position between the property that starts the chain on the named target and the eventual animated property. In the provided syntax, that is `propertyName2`. For instance, an indexer usage might be necessary if the intermediate property is a collection such as , in a property path such as `RenderTransform.Children[1].Angle`.
diff --git a/docs/framework/wpf/advanced/relativesource-markupextension.md b/docs/framework/wpf/advanced/relativesource-markupextension.md
index ec123a639fb74..91b798b6a140c 100644
--- a/docs/framework/wpf/advanced/relativesource-markupextension.md
+++ b/docs/framework/wpf/advanced/relativesource-markupextension.md
@@ -16,13 +16,13 @@ Specifies properties of a binding sour
## XAML Attribute Usage
```xml
-
+
```
## XAML Attribute Usage (nested within Binding extension)
```xml
-
+
```
## XAML Object Element Usage
@@ -96,6 +96,7 @@ In the following example, the first in
+
```
Describing data binding as a concept is not covered here, see [Data Binding Overview](../../../desktop-wpf/data/data-binding-overview.md).
diff --git a/docs/framework/wpf/advanced/staticresource-markup-extension.md b/docs/framework/wpf/advanced/staticresource-markup-extension.md
index 093d3b62b2418..bcb0313243d53 100644
--- a/docs/framework/wpf/advanced/staticresource-markup-extension.md
+++ b/docs/framework/wpf/advanced/staticresource-markup-extension.md
@@ -15,7 +15,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
## XAML Attribute Usage
```xml
-
+
```
## XAML Object Element Usage
@@ -23,7 +23,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
```xml
```
@@ -52,7 +52,7 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../../includes/tla2sharp
`StaticResource` can also be used in a verbose attribute usage that specifies the property as a property=value pair:
```xml
-
+
```
The verbose usage is often useful for extensions that have more than one settable property, or if some properties are optional. Because `StaticResource` has only one settable property, which is required, this verbose usage is not typical.
diff --git a/docs/framework/wpf/advanced/templatebinding-markup-extension.md b/docs/framework/wpf/advanced/templatebinding-markup-extension.md
index 248c519b00760..5933853feaefb 100644
--- a/docs/framework/wpf/advanced/templatebinding-markup-extension.md
+++ b/docs/framework/wpf/advanced/templatebinding-markup-extension.md
@@ -15,13 +15,13 @@ Links the value of a property in a control template to be the value of another p
## XAML Attribute Usage
```xml
-
+
```
## XAML Attribute Usage (for Setter property in template or style)
```xml
-
+
```
## XAML Values
@@ -46,7 +46,7 @@ Links the value of a property in a control template to be the value of another p
`TemplateBinding` can also be used in a verbose attribute usage that specifies the property as a property=value pair:
```xml
-
+
```
The verbose usage is often useful for extensions that have more than one settable property, or if some properties are optional. Because `TemplateBinding` has only one settable property, which is required, this verbose usage is not typical.
diff --git a/docs/framework/wpf/advanced/themedictionary-markup-extension.md b/docs/framework/wpf/advanced/themedictionary-markup-extension.md
index 131d9dfd22252..4e466a4ee1572 100644
--- a/docs/framework/wpf/advanced/themedictionary-markup-extension.md
+++ b/docs/framework/wpf/advanced/themedictionary-markup-extension.md
@@ -15,7 +15,7 @@ Provides a way for custom control authors or applications that integrate third-p
## XAML Attribute Usage
```xml
-
+
```
## XAML Object Element Usage
@@ -48,7 +48,7 @@ Provides a way for custom control authors or applications that integrate third-p
`ThemeDictionary` can also be used in a verbose attribute usage that specifies the property as a property=value pair:
```xml
-
+
```
The verbose usage is often useful for extensions that have more than one settable property, or if some properties are optional. Because `ThemeDictionary` has only one settable property, which is required, this verbose usage is not typical.
diff --git a/docs/framework/wpf/app-development/wpf-windows-overview.md b/docs/framework/wpf/app-development/wpf-windows-overview.md
index cbeb4bcb4b550..c0b83ad3ba5ef 100644
--- a/docs/framework/wpf/app-development/wpf-windows-overview.md
+++ b/docs/framework/wpf/app-development/wpf-windows-overview.md
@@ -109,8 +109,7 @@ Users interact with Windows Presentation Foundation (WPF) standalone application
This is shown in the following MSBuild project file.
```xml
-
+
...
diff --git a/docs/standard/assembly/inspect-contents-using-metadataloadcontext.md b/docs/standard/assembly/inspect-contents-using-metadataloadcontext.md
index 93cc88d14a647..b8e0ee2ca168e 100644
--- a/docs/standard/assembly/inspect-contents-using-metadataloadcontext.md
+++ b/docs/standard/assembly/inspect-contents-using-metadataloadcontext.md
@@ -35,4 +35,4 @@ The following code sample creates ,
## Example
-For a complete code example, see the [Inspect assembly contents using MetadataLoadContext sample](https://github.com/dotnet/samples/tree/master/core/assembly/MetadataLoadContext).
+For a complete code example, see the [Inspect assembly contents using MetadataLoadContext sample](https://docs.microsoft.com/samples/dotnet/samples/inspect-assembly-contents-using-metadataloadcontext/).
diff --git a/docs/standard/base-types/character-encoding-introduction.md b/docs/standard/base-types/character-encoding-introduction.md
index eb7f5733241c9..3e8d9295f40e7 100644
--- a/docs/standard/base-types/character-encoding-introduction.md
+++ b/docs/standard/base-types/character-encoding-introduction.md
@@ -237,7 +237,7 @@ Consider the `string` instances "a", "á". "á", and "`👩🏽🚒`". If yo
* The string "á" is represented by one scalar value and contains one `char` instance.
- * `U+00E1 LATIN SMALL LETTER E WITH ACUTE`
+ * `U+00E1 LATIN SMALL LETTER A WITH ACUTE`
* The string "á" looks the same as "á" but is represented by two scalar values and contains two `char` instances.
diff --git a/includes/core-changes/windowsforms/5.0/winforms-deprecated-controls.md b/includes/core-changes/windowsforms/5.0/winforms-deprecated-controls.md
new file mode 100644
index 0000000000000..ae97dd7fe9c26
--- /dev/null
+++ b/includes/core-changes/windowsforms/5.0/winforms-deprecated-controls.md
@@ -0,0 +1,64 @@
+### Removed status bar controls
+
+Starting in .NET 5.0 Preview 1, some Windows Forms controls are no longer available.
+
+#### Change description
+
+Starting with .NET 5.0 Preview 1, some of the status bar-related Windows Forms controls are no longer available. Replacement controls that have better design and support were introduced in .NET Framework 2.0. The deprecated controls were previously removed from designer toolboxes but were still available to be used. Now, they have been completely removed.
+
+The following types are no longer available:
+
+* `StatusBar`
+* `StatusBarDrawItemEventArgs`
+* `StatusBarDrawItemEventHandler`
+* `StatusBarPanel`
+* `StatusBarPanelAutoSize`
+* `StatusBarPanelBorderStyle`
+* `StatusBarPanelClickEventArgs`
+* `StatusBarPanelClickEventHandler`
+* `StatusBarPanelStyle`
+
+#### Version introduced
+
+5.0 Preview 1
+
+#### Recommended action
+
+Move to the replacement APIs for these controls and their scenarios:
+
+| Old Control (API) | Recommended Replacement |
+|-------------------|--------------------------------------------------|
+| StatusBar | |
+| StatusBarPanel | |
+
+#### Category
+
+Windows Forms
+
+#### Affected APIs
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
diff --git a/samples/snippets/csharp/keywords/FixedKeywordExamples.cs b/samples/snippets/csharp/keywords/FixedKeywordExamples.cs
index 62a47f27a3c25..f6874cdeee8ef 100644
--- a/samples/snippets/csharp/keywords/FixedKeywordExamples.cs
+++ b/samples/snippets/csharp/keywords/FixedKeywordExamples.cs
@@ -192,33 +192,34 @@ public struct PathArray
//
//
- internal unsafe struct MyBuffer
+ internal unsafe struct Buffer
{
public fixed char fixedBuffer[128];
}
- internal unsafe class MyClass
+ internal unsafe class Example
{
- public MyBuffer myBuffer = default;
+ public Buffer buffer = default;
}
private static void AccessEmbeddedArray()
{
- MyClass myC = new MyClass();
+ var example = new Example();
unsafe
{
// Pin the buffer to a fixed location in memory.
- fixed (char* charPtr = myC.myBuffer.fixedBuffer)
+ fixed (char* charPtr = example.buffer.fixedBuffer)
{
*charPtr = 'A';
}
// Access safely through the index:
- char c = myC.myBuffer.fixedBuffer[0];
+ char c = example.buffer.fixedBuffer[0];
Console.WriteLine(c);
- // modify through the index:
- myC.myBuffer.fixedBuffer[0] = 'B';
- Console.WriteLine(myC.myBuffer.fixedBuffer[0]);
+
+ // Modify through the index:
+ example.buffer.fixedBuffer[0] = 'B';
+ Console.WriteLine(example.buffer.fixedBuffer[0]);
}
}
//