From 2e59cbd73bff66995c68af1b39b4bfab5d7d74c4 Mon Sep 17 00:00:00 2001 From: pkulikov Date: Sat, 18 Apr 2020 22:30:50 +0200 Subject: [PATCH] Use standard English --- .../Microsoft-platform-tools-containerized-apps/index.md | 4 ++-- .../design-docker-applications.md | 2 +- .../docker-apps-inner-loop-workflow.md | 6 +++--- .../design-develop-containerized-apps/soa-applications.md | 2 +- .../docker-application-outer-loop-devops-workflow.md | 4 ++-- .../deploy-existing-net-apps-as-windows-containers.md | 4 ++-- .../life-cycle-ci-cd-pipelines-devops-tools.md | 2 +- .../modernize-your-apps-with-monitoring-and-telemetry.md | 4 ++-- ...ely-cast-using-pattern-matching-is-and-as-operators.md | 2 +- docs/csharp/language-reference/builtin-types/char.md | 2 +- docs/csharp/language-reference/builtin-types/enum.md | 4 ++-- .../builtin-types/floating-point-numeric-types.md | 2 +- .../builtin-types/integral-numeric-types.md | 2 +- .../builtin-types/nullable-value-types.md | 8 ++++---- .../csharp/language-reference/compiler-messages/cs0467.md | 2 +- docs/csharp/language-reference/keywords/do.md | 2 +- docs/csharp/language-reference/keywords/for.md | 2 +- docs/csharp/language-reference/keywords/foreach-in.md | 2 +- docs/csharp/language-reference/keywords/if-else.md | 2 +- docs/csharp/language-reference/keywords/params.md | 2 +- docs/csharp/language-reference/keywords/while.md | 2 +- .../language-reference/operators/arithmetic-operators.md | 4 ++-- .../operators/member-access-operators.md | 2 +- .../csharp/language-reference/operators/null-forgiving.md | 2 +- .../operators/pointer-related-operators.md | 2 +- .../language-reference/operators/type-testing-and-cast.md | 2 +- docs/csharp/language-reference/tokens/interpolated.md | 4 ++-- .../programming-guide/arrays/multidimensional-arrays.md | 2 +- .../concepts/async/handling-reentrancy-in-async-apps.md | 6 +++--- .../how-to-subscribe-to-and-unsubscribe-from-events.md | 2 +- .../generics/constraints-on-type-parameters.md | 2 +- .../programming-guide/namespaces/using-namespaces.md | 2 +- .../lambda-expressions.md | 4 ++-- .../tutorials/exploration/interpolated-strings-local.md | 2 +- docs/csharp/whats-new/csharp-8.md | 2 +- .../controls/linklabel-control-overview-windows-forms.md | 2 +- .../winforms/controls/linklabel-control-windows-forms.md | 2 +- .../threading/overview-of-synchronization-primitives.md | 2 +- docs/standard/threading/threads-and-threading.md | 4 ++-- docs/standard/threading/timers.md | 2 +- .../concepts/async/handling-reentrancy-in-async-apps.md | 2 +- 41 files changed, 57 insertions(+), 57 deletions(-) diff --git a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md index 2a941d4b66309..e13432d419b61 100644 --- a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md +++ b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md @@ -33,13 +33,13 @@ The Microsoft platform and tools for containerized Docker apps, as defined in Ta - **DevOps for Docker Apps** Developers creating Docker applications can use [Azure DevOps Services](https://azure.microsoft.com/services/devops/) or any other third-party product, like Jenkins, to build out a comprehensive automated application life-cycle management (ALM). - With Azure DevOps Services, developers can create container-focused DevOps for a fast, iterative process that covers source-code control from anywhere (Azure DevOps Services-Git, GitHub, any remote Git repository, or Subversion), Continuous Integration (CI), internal unit tests, inter-container/service integration tests, Continuous Delivery (CD), and release management (RM). Developers also can automate their Docker application releases into Azure Kubernetes Service (AKS), from development to staging and production environments. + With Azure DevOps Services, developers can create container-focused DevOps for a fast, iterative process that covers source-code control from anywhere (Azure DevOps Services-Git, GitHub, any remote Git repository, or Subversion), Continuous Integration (CI), internal unit tests, inter-container/service integration tests, Continuous Delivery (CD), and release management (RM). Developers can also automate their Docker application releases into Azure Kubernetes Service (AKS), from development to staging and production environments. - **Management and Monitoring** IT can manage and monitor production applications and services in several ways, integrating both perspectives in a consolidated experience. - **Azure portal** If you're using open-source orchestrators, Azure Kubernetes Service (AKS), Service Fabric and other orchestrators help you to set up and maintain your Docker environments. If you're using Azure Service Fabric, the Service Fabric Explorer tool makes it possible for you to visualize and configure your cluster. - - **Docker tools** You can manage your container applications using familiar tools. There's no need to change your existing Docker management practices to move container workloads to the cloud. Use the application management tools you're already familiar with and connect via the standard API endpoints for the orchestrator of your choice. You also can use other third-party tools to manage your Docker applications, such as Docker Datacenter or even CLI Docker tools. + - **Docker tools** You can manage your container applications using familiar tools. There's no need to change your existing Docker management practices to move container workloads to the cloud. Use the application management tools you're already familiar with and connect via the standard API endpoints for the orchestrator of your choice. You can also use other third-party tools to manage your Docker applications, such as Docker Datacenter or even CLI Docker tools. Even if you're familiar with Linux commands, you can manage your container applications using Microsoft Windows and PowerShell with a Linux Subsystem command line and the products (Docker, Kubernetes…) clients running on this Linux Subsystem capability. You'll learn more about using these tools under Linux Subsystem using your favorite Microsoft Windows OS later in this book. diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md index abce28cbc279a..99a3bc50754cb 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md @@ -5,7 +5,7 @@ ms.date: 02/15/2019 --- # Design Docker applications -Chapter 1 introduced the fundamental concepts regarding containers and Docker. That information is the basic level of information you need to get started. But, enterprise applications can be complex and composed of multiple services instead of a single service or container. For those optional use cases, you need to know additional approaches to design, such as Service-Oriented Architecture (SOA) and the more advanced microservices concepts and container orchestration concepts. The scope of this document is not limited to microservices but to any Docker application life cycle, therefore, it does not explore microservices architecture in depth because you also can use containers and Docker with regular SOA, background tasks or jobs, or even with monolithic application deployment approaches. +Chapter 1 introduced the fundamental concepts regarding containers and Docker. That information is the basic level of information you need to get started. But, enterprise applications can be complex and composed of multiple services instead of a single service or container. For those optional use cases, you need to know additional approaches to design, such as Service-Oriented Architecture (SOA) and the more advanced microservices concepts and container orchestration concepts. The scope of this document is not limited to microservices but to any Docker application life cycle, therefore, it does not explore microservices architecture in depth because you can also use containers and Docker with regular SOA, background tasks or jobs, or even with monolithic application deployment approaches. **More info** To learn more about enterprise applications and microservices architecture in depth, read the guide [NET Microservices: Architecture for Containerized .NET Applications](../../microservices/index.md) that you can also download from . diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md index 3643edb35eafb..aa4caaad1eaac 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md @@ -48,7 +48,7 @@ With the latest versions of Docker for Mac and Windows, it's easier than ever to In addition, you'll need a code editor so that you can actually develop your application while using Docker CLI. -Microsoft provides Visual Studio Code, which is a lightweight code editor that's supported on Windows, Linux, and macOS, and provides IntelliSense with [support for many languages](https://code.visualstudio.com/docs/languages/overview) (JavaScript, .NET, Go, Java, Ruby, Python, and most modern languages), [debugging](https://code.visualstudio.com/Docs/editor/debugging), [integration with Git](https://code.visualstudio.com/Docs/editor/versioncontrol) and [extensions support](https://code.visualstudio.com/docs/extensions/overview). This editor is a great fit for macOS and Linux developers. In Windows, you also can use Visual Studio. +Microsoft provides Visual Studio Code, which is a lightweight code editor that's supported on Windows, Linux, and macOS, and provides IntelliSense with [support for many languages](https://code.visualstudio.com/docs/languages/overview) (JavaScript, .NET, Go, Java, Ruby, Python, and most modern languages), [debugging](https://code.visualstudio.com/Docs/editor/debugging), [integration with Git](https://code.visualstudio.com/Docs/editor/versioncontrol) and [extensions support](https://code.visualstudio.com/docs/extensions/overview). This editor is a great fit for macOS and Linux developers. In Windows, you can also use Visual Studio. > [!TIP] > For instructions on installing Visual Studio Code for Windows, Linux, or macOS, go to . @@ -150,7 +150,7 @@ For each custom service that comprises your app, you'll need to create a related > > Therefore, each developer first needs to do the entire inner-loop process to test locally and continue developing until they want to push a complete feature or change to the source control system. -To create an image in your local environment and using the DockerFile, you can use the docker build command, as demonstrated in Figure 4-25 (you also can run `docker-compose up --build` for applications composed by several containers/services). +To create an image in your local environment and using the DockerFile, you can use the docker build command, as demonstrated in Figure 4-25 (you can also run `docker-compose up --build` for applications composed by several containers/services). ![Screenshot showing the console output of the docker build command.](./media/docker-apps-inner-loop-workflow/run-docker-build-command.png) @@ -257,7 +257,7 @@ You can test this by using CURL from the terminal. In a Docker installation on W Visual Studio Code supports debugging Docker if you're using Node.js and other platforms like .NET Core containers. -You also can debug .NET Core or .NET Framework containers in Docker when using Visual Studio for Windows or Mac, as described in the next section. +You can also debug .NET Core or .NET Framework containers in Docker when using Visual Studio for Windows or Mac, as described in the next section. > [!TIP] > To learn more about debugging Node.js Docker containers, see and . diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md index 16e29e208270f..a5e7a676ef729 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md @@ -11,7 +11,7 @@ Today, you can deploy those services as Docker containers, which solve deploymen Docker containers are useful (but not required) for both traditional service-oriented architectures and the more advanced microservices architectures. -At the end of the day, the container clustering solutions are useful for both a traditional SOA architecture and for a more advanced microservices architecture in which each microservice owns its data model. And thanks to multiple databases, you also can scale out the data tier instead of working with monolithic databases shared by the SOA services. However, the discussion about splitting the data is purely about architecture and design. +At the end of the day, the container clustering solutions are useful for both a traditional SOA architecture and for a more advanced microservices architecture in which each microservice owns its data model. And thanks to multiple databases, you can also scale out the data tier instead of working with monolithic databases shared by the SOA services. However, the discussion about splitting the data is purely about architecture and design. >[!div class="step-by-step"] >[Previous](state-and-data-in-docker-applications.md) diff --git a/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md b/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md index 7733bf6331e08..40bc8bd108da5 100644 --- a/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md +++ b/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md @@ -25,7 +25,7 @@ Even though source-code control (SCC) and source-code management might seem seco The local images, generated by developers, should just be used by them when testing within their own machines. That's why it's critical to have the DevOps pipeline activated from the SCC code. -Azure DevOps Services and Team Foundation Server support Git and Team Foundation Version Control. You can choose between them and use it for an end-to-end Microsoft experience. However, you also can manage your code in external repositories (like GitHub, on-premises Git repositories, or Subversion) and still be able to connect to it and get the code as the starting point for your DevOps CI pipeline. +Azure DevOps Services and Team Foundation Server support Git and Team Foundation Version Control. You can choose between them and use it for an end-to-end Microsoft experience. However, you can also manage your code in external repositories (like GitHub, on-premises Git repositories, or Subversion) and still be able to connect to it and get the code as the starting point for your DevOps CI pipeline. ## Step 3: Build, CI, Integrate, and Test with Azure DevOps Services and Docker @@ -180,7 +180,7 @@ From a CD point of view, and Azure DevOps Services specifically, you can run spe **Figure 5-9**. Deploying distributed applications to Container Service -Initially, when deploying to certain clusters or orchestrators, you would traditionally use specific deployment scripts and mechanisms per each orchestrator (that is, Kubernetes and Service Fabric have different deployment mechanisms) instead of the simpler and easy-to-use `docker-compose` tool based on the `docker-compose.yml` definition file. However, thanks to the Azure DevOps Services Docker Deploy task, shown in Figure 5-10, you now also can deploy to the supported orchestrators by just using your familiar `docker-compose.yml` file because the tool performs that "translation" for you (from your `docker-compose.yml` file to the format needed by the orchestrator). +Initially, when deploying to certain clusters or orchestrators, you would traditionally use specific deployment scripts and mechanisms per each orchestrator (that is, Kubernetes and Service Fabric have different deployment mechanisms) instead of the simpler and easy-to-use `docker-compose` tool based on the `docker-compose.yml` definition file. However, thanks to the Azure DevOps Services Docker Deploy task, shown in Figure 5-10, now you can also deploy to the supported orchestrators by just using your familiar `docker-compose.yml` file because the tool performs that "translation" for you (from your `docker-compose.yml` file to the format needed by the orchestrator). ![Screenshot showing the Deploy to Kubernetes task.](./media/docker-application-outer-loop-devops-workflow/add-deploy-to-kubernetes-task.png) diff --git a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md index 7e651235ecadc..bfb27f5af51b9 100644 --- a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md +++ b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md @@ -51,7 +51,7 @@ Significant improvements in agility, portability, and control ultimately lead to To someone familiar with virtual machines, containers might appear to be remarkably similar. A container runs an operating system, has a file system, and can be accessed over a network, just like a physical or virtual computer system. However, the technology and concepts behind containers are vastly different from virtual machines. From a developer point of view, a container must be treated more like a single process. In fact, a container has a single entry point for one process. -Docker containers (for simplicity, *containers*) can run natively on Linux and Windows. When running regular containers, Windows containers can run only on Windows hosts (a host server or a VM), and Linux containers can run only on Linux hosts. However, in recent versions of Windows Server and Hyper-V containers, a Linux container also can run natively on Windows Server by using the Hyper-V isolation technology that currently is available only in Windows Server Containers. +Docker containers (for simplicity, *containers*) can run natively on Linux and Windows. When running regular containers, Windows containers can run only on Windows hosts (a host server or a VM), and Linux containers can run only on Linux hosts. However, in recent versions of Windows Server and Hyper-V containers, a Linux container can also run natively on Windows Server by using the Hyper-V isolation technology that currently is available only in Windows Server Containers. In the near future, mixed environments that have both Linux and Windows containers will be possible and even common. @@ -99,7 +99,7 @@ For .NET Core (cross-platform for Linux and Windows), the tags would look like t ### Multi-arch images -Beginning in mid-2017, you also can use a new feature in Docker called [multi-arch](https://github.com/moby/moby/issues/15866) images. .NET Core Docker images can use multi-arch tags. Your Dockerfile files no longer need to define the operating system that you are targeting. The multi-arch feature allows a single tag to be used across multiple machine configurations. For instance, with multi-arch, you can use one common tag: **microsoft/dotnet:2.0.0-runtime**. If you pull that tag from a Linux container environment, you get the Debian-based image. If you pull that tag from a Windows container environment, you get the Nano Server-based image. +Beginning in mid-2017, you can also use a new feature in Docker called [multi-arch](https://github.com/moby/moby/issues/15866) images. .NET Core Docker images can use multi-arch tags. Your Dockerfile files no longer need to define the operating system that you are targeting. The multi-arch feature allows a single tag to be used across multiple machine configurations. For instance, with multi-arch, you can use one common tag: **microsoft/dotnet:2.0.0-runtime**. If you pull that tag from a Linux container environment, you get the Debian-based image. If you pull that tag from a Windows container environment, you get the Nano Server-based image. For .NET Framework images, because the traditional .NET Framework supports only Windows, you cannot use the multi-arch feature. diff --git a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/life-cycle-ci-cd-pipelines-devops-tools.md b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/life-cycle-ci-cd-pipelines-devops-tools.md index d2684bde6c72a..d185c08dfa5c6 100644 --- a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/life-cycle-ci-cd-pipelines-devops-tools.md +++ b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/life-cycle-ci-cd-pipelines-devops-tools.md @@ -15,7 +15,7 @@ Azure DevOps Services supports continuous integration and deployment of multi-co - [Deploy to Azure Kubernetes Service](https://docs.microsoft.com/azure/devops/pipelines/apps/cd/deploy-aks?tabs=dotnet-core) -But you also can deploy to [Docker Swarm](https://blog.jcorioland.io/archives/2016/11/29/full-ci-cd-pipeline-to-deploy-multi-containers-application-on-azure-container-service-docker-swarm-using-visual-studio-team-services.html) or DC/OS by using Azure DevOps Services script-based tasks. +But you can also deploy to [Docker Swarm](https://blog.jcorioland.io/archives/2016/11/29/full-ci-cd-pipeline-to-deploy-multi-containers-application-on-azure-container-service-docker-swarm-using-visual-studio-team-services.html) or DC/OS by using Azure DevOps Services script-based tasks. To continue facilitating deployment agility, these tools provide excellent dev-to-test-to-production deployment experiences for container workloads, with a choice of development and CI/CD solutions. diff --git a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/modernize-your-apps-with-monitoring-and-telemetry.md b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/modernize-your-apps-with-monitoring-and-telemetry.md index 051f49c4dc48e..cb0d0d1ce4aca 100644 --- a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/modernize-your-apps-with-monitoring-and-telemetry.md +++ b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/modernize-your-apps-with-monitoring-and-telemetry.md @@ -21,11 +21,11 @@ Figure 4-10 shows an example of how Application Insights monitors your applicati [Azure Log Analytics](https://docs.microsoft.com/azure/log-analytics/log-analytics-overview) is part of the [Microsoft Azure overall monitoring solution](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview). It's also a service in [Operations Management Suite (OMS)](https://docs.microsoft.com/azure/operations-management-suite/operations-management-suite-overview). Log Analytics monitors cloud and on-premises environments (OMS for on-premises) to help maintain availability and performance. It collects data generated by resources in your cloud and on-premises environments and from other monitoring tools to provide analysis across multiple sources. -In relation to Azure infrastructure logs, Log Analytics, as an Azure service, ingests log and metric data from other Azure services (via [Azure Monitor](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-azure-monitor)), Azure VMs, Docker containers, and on-premises or other cloud infrastructures. Log Analytics offers flexible log search and out-of-the box analytics on top of this data. It provides rich tools that you can use to analyze data across sources, it allows complex queries across all logs, and it can proactively alert based on specified conditions. You can even collect custom data in the central Log Analytics repository, where you can query and visualize it. You also can take advantage of the Log Analytics built-in solutions to immediately gain insights into the security and functionality of your infrastructure. +In relation to Azure infrastructure logs, Log Analytics, as an Azure service, ingests log and metric data from other Azure services (via [Azure Monitor](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-azure-monitor)), Azure VMs, Docker containers, and on-premises or other cloud infrastructures. Log Analytics offers flexible log search and out-of-the box analytics on top of this data. It provides rich tools that you can use to analyze data across sources, it allows complex queries across all logs, and it can proactively alert based on specified conditions. You can even collect custom data in the central Log Analytics repository, where you can query and visualize it. You can also take advantage of the Log Analytics built-in solutions to immediately gain insights into the security and functionality of your infrastructure. You can access Log Analytics through the OMS portal or the Azure portal, which run in any browser, and provide you with access to configuration settings and multiple tools to analyze and act on collected data. -The [Container Monitoring solution](https://docs.microsoft.com/azure/log-analytics/log-analytics-containers) in Log Analytics helps you view and manage your Docker and Windows Container hosts in a single location. The solution shows which containers are running, what container image they're running, and where containers are running. You can view detailed audit information, including commands that are being used with containers. You also can troubleshoot containers by viewing and searching centralized logs, without needing to remotely view Docker or Windows hosts. You can find containers that might be noisy and consuming excess resources on a host. Additionally, you can view centralized CPU, memory, storage, and network usage, and performance information, for containers. On computers running Windows, you can centralize and compare logs from Windows Server, Hyper-V, and Docker containers. The solution supports the following container orchestrators: +The [Container Monitoring solution](https://docs.microsoft.com/azure/log-analytics/log-analytics-containers) in Log Analytics helps you view and manage your Docker and Windows Container hosts in a single location. The solution shows which containers are running, what container image they're running, and where containers are running. You can view detailed audit information, including commands that are being used with containers. You can also troubleshoot containers by viewing and searching centralized logs, without needing to remotely view Docker or Windows hosts. You can find containers that might be noisy and consuming excess resources on a host. Additionally, you can view centralized CPU, memory, storage, and network usage, and performance information, for containers. On computers running Windows, you can centralize and compare logs from Windows Server, Hyper-V, and Docker containers. The solution supports the following container orchestrators: - Docker Swarm diff --git a/docs/csharp/how-to/safely-cast-using-pattern-matching-is-and-as-operators.md b/docs/csharp/how-to/safely-cast-using-pattern-matching-is-and-as-operators.md index 8086da63f2802..73e1185f2e5af 100644 --- a/docs/csharp/how-to/safely-cast-using-pattern-matching-is-and-as-operators.md +++ b/docs/csharp/how-to/safely-cast-using-pattern-matching-is-and-as-operators.md @@ -21,7 +21,7 @@ You can also use the same syntax for testing if a [nullable value type](../langu [!code-csharp[Pattern matching with nullable types](../../../samples/snippets/csharp/how-to/safelycast/nullablepatternmatching/Program.cs#PatternMatchingNullable)] -The preceding sample demonstrates other features of pattern matching to use with conversions. You can test a variable for the null pattern by checking specifically for the `null` value. When the runtime value of the variable is `null`, an `is` statement checking for a type always returns `false`. The pattern matching `is` statement doesn't allow a nullable value type, such as `int?` or `Nullable`, but you can test for any other value type. The `is` patterns from the preceding example are not limited to the nullable value types. You also can use those patterns to test if a variable of a reference type has a value or it's `null`. +The preceding sample demonstrates other features of pattern matching to use with conversions. You can test a variable for the null pattern by checking specifically for the `null` value. When the runtime value of the variable is `null`, an `is` statement checking for a type always returns `false`. The pattern matching `is` statement doesn't allow a nullable value type, such as `int?` or `Nullable`, but you can test for any other value type. The `is` patterns from the preceding example are not limited to the nullable value types. You can also use those patterns to test if a variable of a reference type has a value or it's `null`. The preceding sample also shows how you use the type pattern in a `switch` statement where the variable may be one of many different types. diff --git a/docs/csharp/language-reference/builtin-types/char.md b/docs/csharp/language-reference/builtin-types/char.md index 654c5f243252e..f15c0f892fd0b 100644 --- a/docs/csharp/language-reference/builtin-types/char.md +++ b/docs/csharp/language-reference/builtin-types/char.md @@ -30,7 +30,7 @@ You can specify a `char` value with: [!code-csharp-interactive[char literals](snippets/CharType.cs#Literals)] -As the preceding example shows, you also can cast the value of a character code into the corresponding `char` value. +As the preceding example shows, you can also cast the value of a character code into the corresponding `char` value. > [!NOTE] > In the case of a Unicode escape sequence, you must specify all four hexadecimal digits. That is, `\u006A` is a valid escape sequence, while `\u06A` and `\u6A` are not valid. diff --git a/docs/csharp/language-reference/builtin-types/enum.md b/docs/csharp/language-reference/builtin-types/enum.md index fa3422fa3c34a..0c532ce6fd5ea 100644 --- a/docs/csharp/language-reference/builtin-types/enum.md +++ b/docs/csharp/language-reference/builtin-types/enum.md @@ -26,7 +26,7 @@ enum Season } ``` -By default, the associated constant values of enum members are of type `int`; they start with zero and increase by one following the definition text order. You can explicitly specify any other [integral numeric](integral-numeric-types.md) type as an underlying type of an enumeration type. You also can explicitly specify the associated constant values, as the following example shows: +By default, the associated constant values of enum members are of type `int`; they start with zero and increase by one following the definition text order. You can explicitly specify any other [integral numeric](integral-numeric-types.md) type as an underlying type of an enumeration type. You can also explicitly specify the associated constant values, as the following example shows: ```csharp enum ErrorCode : ushort @@ -46,7 +46,7 @@ You use an enumeration type to represent a choice from a set of mutually exclusi ## Enumeration types as bit flags -If you want an enumeration type to represent a combination of choices, define enum members for those choices such that an individual choice is a bit field. That is, the associated values of those enum members should be the powers of two. Then, you can use the [bitwise logical operators `|` or `&`](../operators/bitwise-and-shift-operators.md#enumeration-logical-operators) to combine choices or intersect combinations of choices, respectively. To indicate that an enumeration type declares bit fields, apply the [Flags](xref:System.FlagsAttribute) attribute to it. As the following example shows, you also can include some typical combinations in the definition of an enumeration type. +If you want an enumeration type to represent a combination of choices, define enum members for those choices such that an individual choice is a bit field. That is, the associated values of those enum members should be the powers of two. Then, you can use the [bitwise logical operators `|` or `&`](../operators/bitwise-and-shift-operators.md#enumeration-logical-operators) to combine choices or intersect combinations of choices, respectively. To indicate that an enumeration type declares bit fields, apply the [Flags](xref:System.FlagsAttribute) attribute to it. As the following example shows, you can also include some typical combinations in the definition of an enumeration type. [!code-csharp[enum flags](snippets/EnumType.cs#Flags)] diff --git a/docs/csharp/language-reference/builtin-types/floating-point-numeric-types.md b/docs/csharp/language-reference/builtin-types/floating-point-numeric-types.md index 3e4c9393b448d..77d246c1c5a49 100644 --- a/docs/csharp/language-reference/builtin-types/floating-point-numeric-types.md +++ b/docs/csharp/language-reference/builtin-types/floating-point-numeric-types.md @@ -86,7 +86,7 @@ myMoney = 400.75M; The preceding example also shows the use of `_` as a *digit separator*, which is supported starting with C# 7.0. You can use the digit separator with all kinds of numeric literals. -You also can use scientific notation, that is, specify an exponent part of a real literal, as the following example shows: +You can also use scientific notation, that is, specify an exponent part of a real literal, as the following example shows: ```csharp-interactive double d = 0.42e2; diff --git a/docs/csharp/language-reference/builtin-types/integral-numeric-types.md b/docs/csharp/language-reference/builtin-types/integral-numeric-types.md index 0cdd05f57c950..22805a1b3e0c3 100644 --- a/docs/csharp/language-reference/builtin-types/integral-numeric-types.md +++ b/docs/csharp/language-reference/builtin-types/integral-numeric-types.md @@ -103,7 +103,7 @@ byte b = 300; // CS0031: Constant value '300' cannot be converted to a 'byte' As the preceding example shows, if the literal's value is not within the range of the destination type, a compiler error [CS0031](../../misc/cs0031.md) occurs. -You also can use a cast to convert the value represented by an integer literal to the type other than the determined type of the literal: +You can also use a cast to convert the value represented by an integer literal to the type other than the determined type of the literal: ```csharp var signedByte = (sbyte)42; diff --git a/docs/csharp/language-reference/builtin-types/nullable-value-types.md b/docs/csharp/language-reference/builtin-types/nullable-value-types.md index 4aec371c0d0a9..cbdca0b0ac355 100644 --- a/docs/csharp/language-reference/builtin-types/nullable-value-types.md +++ b/docs/csharp/language-reference/builtin-types/nullable-value-types.md @@ -18,7 +18,7 @@ You typically use a nullable value type when you need to represent the undefined ## Declaration and assignment -As a value type is implicitly convertible to the corresponding nullable value type, you can assign a value to a variable of a nullable value type as you would do that for its underlying value type. You also can assign the `null` value. For example: +As a value type is implicitly convertible to the corresponding nullable value type, you can assign a value to a variable of a nullable value type as you would do that for its underlying value type. You can also assign the `null` value. For example: [!code-csharp[declare and assign](snippets/NullableValueTypes.cs#Declaration)] @@ -40,19 +40,19 @@ The following example uses the `HasValue` property to test whether the variable [!code-csharp-interactive[use HasValue](snippets/NullableValueTypes.cs#HasValue)] -You also can compare a variable of a nullable value type with `null` instead of using the `HasValue` property, as the following example shows: +You can also compare a variable of a nullable value type with `null` instead of using the `HasValue` property, as the following example shows: [!code-csharp-interactive[use comparison with null](snippets/NullableValueTypes.cs#CompareWithNull)] ## Conversion from a nullable value type to an underlying type -If you want to assign a value of a nullable value type to a non-nullable value type variable, you might need to specify the value to be assigned in place of `null`. Use the [null-coalescing operator `??`](../operators/null-coalescing-operator.md) to do that (you also can use the method for the same purpose): +If you want to assign a value of a nullable value type to a non-nullable value type variable, you might need to specify the value to be assigned in place of `null`. Use the [null-coalescing operator `??`](../operators/null-coalescing-operator.md) to do that (you can also use the method for the same purpose): [!code-csharp-interactive[?? operator](snippets/NullableValueTypes.cs#NullCoalescing)] If you want to use the [default](default-values.md) value of the underlying value type in place of `null`, use the method. -You also can explicitly cast a nullable value type to a non-nullable type, as the following example shows: +You can also explicitly cast a nullable value type to a non-nullable type, as the following example shows: [!code-csharp[explicit cast](snippets/NullableValueTypes.cs#Cast)] diff --git a/docs/csharp/language-reference/compiler-messages/cs0467.md b/docs/csharp/language-reference/compiler-messages/cs0467.md index 31590771f1db0..1293bf495ce52 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0467.md +++ b/docs/csharp/language-reference/compiler-messages/cs0467.md @@ -40,7 +40,7 @@ class Driver // To resolve the warning, you can change the name of the method or // the property. - // You also can disambiguate by specifying IList or ICounter. + // You can also disambiguate by specifying IList or ICounter. ((IList)x).Count = 1; ((ICounter)x).Count(3); } diff --git a/docs/csharp/language-reference/keywords/do.md b/docs/csharp/language-reference/keywords/do.md index 127f7ad21bcc2..4f90539a1757c 100644 --- a/docs/csharp/language-reference/keywords/do.md +++ b/docs/csharp/language-reference/keywords/do.md @@ -16,7 +16,7 @@ At any point within the `do` statement block, you can break out of the loop by u You can step directly to the evaluation of the `while` expression by using the [continue](continue.md) statement. If the expression evaluates to `true`, execution continues at the first statement in the loop. Otherwise, execution continues at the first statement after the loop. -You also can exit a `do-while` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. +You can also exit a `do-while` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. ## Example diff --git a/docs/csharp/language-reference/keywords/for.md b/docs/csharp/language-reference/keywords/for.md index 2f84f70c04657..6768d07e586ab 100644 --- a/docs/csharp/language-reference/keywords/for.md +++ b/docs/csharp/language-reference/keywords/for.md @@ -12,7 +12,7 @@ ms.assetid: 34041a40-2c87-467a-9ffb-a0417d8f67a8 The `for` statement executes a statement or a block of statements while a specified Boolean expression evaluates to `true`. -At any point within the `for` statement block, you can break out of the loop by using the [break](break.md) statement, or step to the next iteration in the loop by using the [continue](continue.md) statement. You also can exit a `for` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. +At any point within the `for` statement block, you can break out of the loop by using the [break](break.md) statement, or step to the next iteration in the loop by using the [continue](continue.md) statement. You can also exit a `for` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. ## Structure of the `for` statement diff --git a/docs/csharp/language-reference/keywords/foreach-in.md b/docs/csharp/language-reference/keywords/foreach-in.md index f812c011fa423..acedca5818abd 100644 --- a/docs/csharp/language-reference/keywords/foreach-in.md +++ b/docs/csharp/language-reference/keywords/foreach-in.md @@ -21,7 +21,7 @@ Beginning with C# 7.3, if the enumerator's `Current` property returns a [referen Beginning with C# 8.0, the `await` operator may be applied to the `foreach` statement when the collection type implements the interface. Each iteration of the loop may be suspended while the next element is retrieved asynchronously. By default, stream elements are processed in the captured context. If you want to disable capturing of the context, use the extension method. For more information about synchronization contexts and capturing the current context, see the article on [consuming the Task-based asynchronous pattern](../../../standard/asynchronous-programming-patterns/consuming-the-task-based-asynchronous-pattern.md). -At any point within the `foreach` statement block, you can break out of the loop by using the [break](break.md) statement, or step to the next iteration in the loop by using the [continue](continue.md) statement. You also can exit a `foreach` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. +At any point within the `foreach` statement block, you can break out of the loop by using the [break](break.md) statement, or step to the next iteration in the loop by using the [continue](continue.md) statement. You can also exit a `foreach` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. If the `foreach` statement is applied to `null`, a is thrown. If the source collection of the `foreach` statement is empty, the body of the `foreach` loop isn't executed and skipped. diff --git a/docs/csharp/language-reference/keywords/if-else.md b/docs/csharp/language-reference/keywords/if-else.md index 491d2bbcc9157..1e8cbd2546338 100644 --- a/docs/csharp/language-reference/keywords/if-else.md +++ b/docs/csharp/language-reference/keywords/if-else.md @@ -65,7 +65,7 @@ In the following example, you enter a character from the keyboard, and the progr ## Example -You also can nest an `if` statement inside an else block, as the following partial code shows. The example nests `if` statements inside two else blocks and one then block. The comments specify which conditions are true or false in each block. +You can also nest an `if` statement inside an else block, as the following partial code shows. The example nests `if` statements inside two else blocks and one then block. The comments specify which conditions are true or false in each block. [!code-csharp[csrefKeywordsSelection#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsSelection/CS/csrefKeywordsSelection.cs#5)] diff --git a/docs/csharp/language-reference/keywords/params.md b/docs/csharp/language-reference/keywords/params.md index 05e87dded084e..1647030a3ca65 100644 --- a/docs/csharp/language-reference/keywords/params.md +++ b/docs/csharp/language-reference/keywords/params.md @@ -13,7 +13,7 @@ ms.assetid: 1690815e-b52b-4967-8380-5780aff08012 By using the `params` keyword, you can specify a [method parameter](method-parameters.md) that takes a variable number of arguments. -You can send a comma-separated list of arguments of the type specified in the parameter declaration or an array of arguments of the specified type. You also can send no arguments. If you send no arguments, the length of the `params` list is zero. +You can send a comma-separated list of arguments of the type specified in the parameter declaration or an array of arguments of the specified type. You can also send no arguments. If you send no arguments, the length of the `params` list is zero. No additional parameters are permitted after the `params` keyword in a method declaration, and only one `params` keyword is permitted in a method declaration. diff --git a/docs/csharp/language-reference/keywords/while.md b/docs/csharp/language-reference/keywords/while.md index 3bf09747e4178..3d9ecc56383e0 100644 --- a/docs/csharp/language-reference/keywords/while.md +++ b/docs/csharp/language-reference/keywords/while.md @@ -16,7 +16,7 @@ At any point within the `while` statement block, you can break out of the loop b You can step directly to the evaluation of the `while` expression by using the [continue](continue.md) statement. If the expression evaluates to `true`, execution continues at the first statement in the loop. Otherwise, execution continues at the first statement after the loop. -You also can exit a `while` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. +You can also exit a `while` loop by the [goto](goto.md), [return](return.md), or [throw](throw.md) statements. ## Example diff --git a/docs/csharp/language-reference/operators/arithmetic-operators.md b/docs/csharp/language-reference/operators/arithmetic-operators.md index bdb7717b387a2..e04fe6dcad23f 100644 --- a/docs/csharp/language-reference/operators/arithmetic-operators.md +++ b/docs/csharp/language-reference/operators/arithmetic-operators.md @@ -147,7 +147,7 @@ The addition operator `+` computes the sum of its operands: [!code-csharp-interactive[addition operator](snippets/ArithmeticOperators.cs#Addition)] -You also can use the `+` operator for string concatenation and delegate combination. For more information, see the [`+` and `+=` operators](addition-operator.md) article. +You can also use the `+` operator for string concatenation and delegate combination. For more information, see the [`+` and `+=` operators](addition-operator.md) article. ## Subtraction operator - @@ -155,7 +155,7 @@ The subtraction operator `-` subtracts its right-hand operand from its left-hand [!code-csharp-interactive[subtraction operator](snippets/ArithmeticOperators.cs#Subtraction)] -You also can use the `-` operator for delegate removal. For more information, see the [`-` and `-=` operators](subtraction-operator.md) article. +You can also use the `-` operator for delegate removal. For more information, see the [`-` and `-=` operators](subtraction-operator.md) article. ## Compound assignment diff --git a/docs/csharp/language-reference/operators/member-access-operators.md b/docs/csharp/language-reference/operators/member-access-operators.md index b177ef03bfdfe..e828a6eb7bdf7 100644 --- a/docs/csharp/language-reference/operators/member-access-operators.md +++ b/docs/csharp/language-reference/operators/member-access-operators.md @@ -176,7 +176,7 @@ Available in C# 8.0 and later, the `^` operator indicates the element position f As the preceding example shows, expression `^e` is of the type. In expression `^e`, the result of `e` must be implicitly convertible to `int`. -You also can use the `^` operator with the [range operator](#range-operator-) to create a range of indices. For more information, see [Indices and ranges](../../tutorials/ranges-indexes.md). +You can also use the `^` operator with the [range operator](#range-operator-) to create a range of indices. For more information, see [Indices and ranges](../../tutorials/ranges-indexes.md). ## Range operator .. diff --git a/docs/csharp/language-reference/operators/null-forgiving.md b/docs/csharp/language-reference/operators/null-forgiving.md index e5859d735a569..350517a71b135 100644 --- a/docs/csharp/language-reference/operators/null-forgiving.md +++ b/docs/csharp/language-reference/operators/null-forgiving.md @@ -27,7 +27,7 @@ Using the [MSTest test framework](../../../core/testing/unit-testing-with-mstest Without the null-forgiving operator, the compiler generates the following warning for the preceding code: `Warning CS8625: Cannot convert null literal to non-nullable reference type`. By using the null-forgiving operator, you inform the compiler that passing `null` is expected and shouldn't be warned about. -You also can use the null-forgiving operator when you definitely know that an expression cannot be `null` but the compiler doesn't manage to recognize that. In the following example, if the `IsValid` method returns `true`, its argument is not `null` and you can safely dereference it: +You can also use the null-forgiving operator when you definitely know that an expression cannot be `null` but the compiler doesn't manage to recognize that. In the following example, if the `IsValid` method returns `true`, its argument is not `null` and you can safely dereference it: [!code-csharp[Use null-forgiving operator](snippets/NullForgivingOperator.cs#UseNullForgiving)] diff --git a/docs/csharp/language-reference/operators/pointer-related-operators.md b/docs/csharp/language-reference/operators/pointer-related-operators.md index 2b08eb5fd3171..604a160d8043f 100644 --- a/docs/csharp/language-reference/operators/pointer-related-operators.md +++ b/docs/csharp/language-reference/operators/pointer-related-operators.md @@ -97,7 +97,7 @@ In the preceding example, a [`stackalloc` expression](stackalloc.md) allocates a You cannot use `[]` for pointer element access with an expression of type `void*`. -You also can use the `[]` operator for [array element or indexer access](member-access-operators.md#indexer-operator-). +You can also use the `[]` operator for [array element or indexer access](member-access-operators.md#indexer-operator-). ## Pointer arithmetic operators diff --git a/docs/csharp/language-reference/operators/type-testing-and-cast.md b/docs/csharp/language-reference/operators/type-testing-and-cast.md index 646717229a306..f0c203ad931c6 100644 --- a/docs/csharp/language-reference/operators/type-testing-and-cast.md +++ b/docs/csharp/language-reference/operators/type-testing-and-cast.md @@ -117,7 +117,7 @@ The `typeof` operator obtains the method that produces a result string for the . - A method that produces a result string for a specified culture. - You also can use the method to provide a user-defined implementation of the interface that supports custom formatting. For more information, see the [Custom formatting with ICustomFormatter](../../../standard/base-types/formatting-types.md#custom-formatting-with-icustomformatter) section of the [Formatting types in .NET](../../../standard/base-types/formatting-types.md) article. + You can also use the method to provide a user-defined implementation of the interface that supports custom formatting. For more information, see the [Custom formatting with ICustomFormatter](../../../standard/base-types/formatting-types.md#custom-formatting-with-icustomformatter) section of the [Formatting types in .NET](../../../standard/base-types/formatting-types.md) article. 1. Conversion of an interpolated string to an instance that also allows you to create multiple result strings with culture-specific content from a single instance. @@ -78,7 +78,7 @@ The following example uses implicit conversion to variable, `cts`, that’s in scope for all methods. @@ -301,7 +301,7 @@ This third example is the most complicated in that the app starts another asynch The operations share a global , `pendingWork`, which serves as a gatekeeper for the display process. -To set up this scenario, make the following changes to the basic code that is provided in [Reviewing and Running the Example App](#BKMD_SettingUpTheExample). You also can download the finished app from [Async Samples: Reentrancy in .NET Desktop Apps](https://code.msdn.microsoft.com/Async-Sample-Preventing-a8489f06). The name of the project is QueueResults. +To set up this scenario, make the following changes to the basic code that is provided in [Reviewing and Running the Example App](#BKMD_SettingUpTheExample). You can also download the finished app from [Async Samples: Reentrancy in .NET Desktop Apps](https://code.msdn.microsoft.com/Async-Sample-Preventing-a8489f06). The name of the project is QueueResults. The following output shows the result if the user chooses the **Start** button only once. The letter label, A, indicates that the result is from the first time the **Start** button is chosen. The numbers show the order of the URLs in the list of download targets. diff --git a/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md b/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md index f740c20ec20f5..dc727d943db7b 100644 --- a/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md +++ b/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md @@ -51,7 +51,7 @@ You subscribe to an event that is published by another class when you want to wr publisher.RaiseCustomEvent += new CustomEventHandler(HandleCustomEvent); ``` - You also can use a [lambda expression](../statements-expressions-operators/lambda-expressions.md) to specify an event handler: + You can also use a [lambda expression](../statements-expressions-operators/lambda-expressions.md) to specify an event handler: ```csharp public Form1() diff --git a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md index bdfc9b7cb4621..5e9d7d3af708e 100644 --- a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md +++ b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md @@ -13,7 +13,7 @@ Constraints inform the compiler about the capabilities a type argument must have |Constraint|Description| |----------------|-----------------| -|`where T : struct`|The type argument must be a non-nullable value type. For information about nullable value types, see [Nullable value types](../../language-reference/builtin-types/nullable-value-types.md). Because all value types have an accessible parameterless constructor, the `struct` constraint implies the `new()` constraint and can't be combined with the `new()` constraint. You also can't combine the `struct` constraint with the `unmanaged` constraint.| +|`where T : struct`|The type argument must be a non-nullable value type. For information about nullable value types, see [Nullable value types](../../language-reference/builtin-types/nullable-value-types.md). Because all value types have an accessible parameterless constructor, the `struct` constraint implies the `new()` constraint and can't be combined with the `new()` constraint. You can't combine the `struct` constraint with the `unmanaged` constraint.| |`where T : class`|The type argument must be a reference type. This constraint applies also to any class, interface, delegate, or array type. In a nullable context in C# 8.0 or later, `T` must be a non-nullable reference type. | |`where T : class?`|The type argument must be a reference type, either nullable or non-nullable. This constraint applies also to any class, interface, delegate, or array type.| |`where T : notnull`|The type argument must be a non-nullable type. The argument can be a non-nullable reference type in C# 8.0 or later, or a non-nullable value type. | diff --git a/docs/csharp/programming-guide/namespaces/using-namespaces.md b/docs/csharp/programming-guide/namespaces/using-namespaces.md index aa2d7bc602afa..4ea7dd93d1959 100644 --- a/docs/csharp/programming-guide/namespaces/using-namespaces.md +++ b/docs/csharp/programming-guide/namespaces/using-namespaces.md @@ -30,7 +30,7 @@ Namespaces are heavily used within C# programs in two ways. Firstly, the .NET Fr ## Namespace aliases - You also can use the [`using` directive](../../language-reference/keywords/using-directive.md) to create an alias for a namespace. Use the [namespace alias qualifier `::`](../../language-reference/operators/namespace-alias-qualifier.md) to access the members of the aliased namespace. The following example shows how to create and use a namespace alias: + You can also use the [`using` directive](../../language-reference/keywords/using-directive.md) to create an alias for a namespace. Use the [namespace alias qualifier `::`](../../language-reference/operators/namespace-alias-qualifier.md) to access the members of the aliased namespace. The following example shows how to create and use a namespace alias: [!code-csharp[csProgGuideNamespaces#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideNamespaces/CS/Namespaces.cs#5)] diff --git a/docs/csharp/programming-guide/statements-expressions-operators/lambda-expressions.md b/docs/csharp/programming-guide/statements-expressions-operators/lambda-expressions.md index 9462247c961d5..4454fd8a89dce 100644 --- a/docs/csharp/programming-guide/statements-expressions-operators/lambda-expressions.md +++ b/docs/csharp/programming-guide/statements-expressions-operators/lambda-expressions.md @@ -31,11 +31,11 @@ Any lambda expression can be converted to a [delegate](../../language-reference/ [!code-csharp-interactive[lambda is delegate](~/samples/snippets/csharp/programming-guide/lambda-expressions/Introduction.cs#Delegate)] -Expression lambdas also can be converted to the [expression tree](../concepts/expression-trees/index.md) types, as the following example shows: +Expression lambdas can also be converted to the [expression tree](../concepts/expression-trees/index.md) types, as the following example shows: [!code-csharp-interactive[lambda is expression tree](~/samples/snippets/csharp/programming-guide/lambda-expressions/Introduction.cs#ExpressionTree)] -You can use lambda expressions in any code that requires instances of delegate types or expression trees, for example as an argument to the method to pass the code that should be executed in the background. You also can use lambda expressions when you write [LINQ in C#](../../linq/index.md), as the following example shows: +You can use lambda expressions in any code that requires instances of delegate types or expression trees, for example as an argument to the method to pass the code that should be executed in the background. You can also use lambda expressions when you write [LINQ in C#](../../linq/index.md), as the following example shows: [!code-csharp-interactive[lambda is argument in LINQ](~/samples/snippets/csharp/programming-guide/lambda-expressions/Introduction.cs#Argument)] diff --git a/docs/csharp/tutorials/exploration/interpolated-strings-local.md b/docs/csharp/tutorials/exploration/interpolated-strings-local.md index 58ba189da119c..5bc275cbf56a2 100644 --- a/docs/csharp/tutorials/exploration/interpolated-strings-local.md +++ b/docs/csharp/tutorials/exploration/interpolated-strings-local.md @@ -7,7 +7,7 @@ ms.date: 10/23/2018 This tutorial teaches you how to use C# [string interpolation](../../language-reference/tokens/interpolated.md) to insert values into a single result string. You write C# code and see the results of compiling and running it. The tutorial contains a series of lessons that show you how to insert values into a string and format those values in different ways. -This tutorial expects that you have a machine you can use for development. The .NET tutorial [Hello World in 10 minutes](https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro) has instructions for setting up your local development environment on Windows, Linux, or macOS. You also can complete the [interactive version](interpolated-strings.yml) of this tutorial in your browser. +This tutorial expects that you have a machine you can use for development. The .NET tutorial [Hello World in 10 minutes](https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro) has instructions for setting up your local development environment on Windows, Linux, or macOS. You can also complete the [interactive version](interpolated-strings.yml) of this tutorial in your browser. ## Create an interpolated string diff --git a/docs/csharp/whats-new/csharp-8.md b/docs/csharp/whats-new/csharp-8.md index c3d87ed445353..70179970972b4 100644 --- a/docs/csharp/whats-new/csharp-8.md +++ b/docs/csharp/whats-new/csharp-8.md @@ -466,7 +466,7 @@ The range can then be used inside the `[` and `]` characters: var text = words[phrase]; ``` -Not only arrays support indices and ranges. You also can use indices and ranges with [string](../language-reference/builtin-types/reference-types.md#the-string-type), , or . For more information, see [Type support for indices and ranges](../tutorials/ranges-indexes.md#type-support-for-indices-and-ranges). +Not only arrays support indices and ranges. You can also use indices and ranges with [string](../language-reference/builtin-types/reference-types.md#the-string-type), , or . For more information, see [Type support for indices and ranges](../tutorials/ranges-indexes.md#type-support-for-indices-and-ranges). You can explore more about indices and ranges in the tutorial on [indices and ranges](../tutorials/ranges-indexes.md). diff --git a/docs/framework/winforms/controls/linklabel-control-overview-windows-forms.md b/docs/framework/winforms/controls/linklabel-control-overview-windows-forms.md index 2ffbada3dd05f..7a814246e7b45 100644 --- a/docs/framework/winforms/controls/linklabel-control-overview-windows-forms.md +++ b/docs/framework/winforms/controls/linklabel-control-overview-windows-forms.md @@ -10,7 +10,7 @@ helpviewer_keywords: ms.assetid: 9e248549-10ca-43a3-bb5e-60f583d369f1 --- # LinkLabel Control Overview (Windows Forms) -The Windows Forms control allows you to add Web-style links to Windows Forms applications. You can use the control for everything that you can use the control for; you also can set part of the text as a link to a file, folder, or Web page. +The Windows Forms control allows you to add Web-style links to Windows Forms applications. You can use the control for everything that you can use the control for; you can also set part of the text as a link to a file, folder, or Web page. ## What You Can Do with the LinkLabel Control In addition to all the properties, methods, and events of the control, the control has properties for hyperlinks and link colors. The property sets the area of the text that activates the link. The , , and properties set the colors of the link. The event determines what happens when the link text is selected. diff --git a/docs/framework/winforms/controls/linklabel-control-windows-forms.md b/docs/framework/winforms/controls/linklabel-control-windows-forms.md index ad2b7c8875abf..3640d562c31f0 100644 --- a/docs/framework/winforms/controls/linklabel-control-windows-forms.md +++ b/docs/framework/winforms/controls/linklabel-control-windows-forms.md @@ -10,7 +10,7 @@ helpviewer_keywords: ms.assetid: af1fd04e-e126-4fd7-9a4e-13b49010c5ca --- # LinkLabel Control (Windows Forms) -The Windows Forms `LinkLabel` control enables you to add Web-style links to Windows Forms applications. You can use the `LinkLabel` control for everything that you can use the control for; you also can set part of the text as a link to an object or Web page. +The Windows Forms `LinkLabel` control enables you to add Web-style links to Windows Forms applications. You can use the `LinkLabel` control for everything that you can use the control for; you can also set part of the text as a link to an object or Web page. ## In This Section [LinkLabel Control Overview](linklabel-control-overview-windows-forms.md) diff --git a/docs/standard/threading/overview-of-synchronization-primitives.md b/docs/standard/threading/overview-of-synchronization-primitives.md index c07cb690aca6d..0af371b7f62ac 100644 --- a/docs/standard/threading/overview-of-synchronization-primitives.md +++ b/docs/standard/threading/overview-of-synchronization-primitives.md @@ -59,7 +59,7 @@ For more information, see the API reference. The class, like , grants exclusive access to a shared resource. Use one of the [Mutex.WaitOne]() method overloads to request the ownership of a mutex. Like , has thread affinity and the thread that acquired a mutex must release it by calling the method. -Unlike , the class can be used for inter-process synchronization. To do that, use a named mutex, which is visible throughout the operating system. To create a named mutex instance, use a [Mutex constructor]() that specifies a name. You also can call the method to open an existing named system mutex. +Unlike , the class can be used for inter-process synchronization. To do that, use a named mutex, which is visible throughout the operating system. To create a named mutex instance, use a [Mutex constructor]() that specifies a name. You can also call the method to open an existing named system mutex. For more information, see the [Mutexes](mutexes.md) article and the API reference. diff --git a/docs/standard/threading/threads-and-threading.md b/docs/standard/threading/threads-and-threading.md index db2885768b374..59151d2329781 100644 --- a/docs/standard/threading/threads-and-threading.md +++ b/docs/standard/threading/threads-and-threading.md @@ -25,7 +25,7 @@ By default, a .NET program is started with a single thread, often called the *pr You use multiple threads to increase the responsiveness of your application and to take advantage of a multiprocessor or multi-core system to increase the application's throughput. -Consider a desktop application, in which the primary thread is responsible for user interface elements and responds to user actions. Use worker threads to perform time-consuming operations that, otherwise, would occupy the primary thread and make the user interface non-responsive. You also can use a dedicated thread for network or device communication to be more responsive to incoming messages or events. +Consider a desktop application, in which the primary thread is responsible for user interface elements and responds to user actions. Use worker threads to perform time-consuming operations that, otherwise, would occupy the primary thread and make the user interface non-responsive. You can also use a dedicated thread for network or device communication to be more responsive to incoming messages or events. If your program performs operations that can be done in parallel, the total execution time can be decreased by performing those operations in separate threads and running the program on a multiprocessor or multi-core system. On such a system, use of multithreading might increase throughput along with the increased responsiveness. @@ -33,7 +33,7 @@ If your program performs operations that can be done in parallel, the total exec Starting with the .NET Framework 4, the recommended way to utilize multithreading is to use [Task Parallel Library (TPL)](../parallel-programming/task-parallel-library-tpl.md) and [Parallel LINQ (PLINQ)](../parallel-programming/introduction-to-plinq.md). For more information, see [Parallel programming](../parallel-programming/index.md). -Both TPL and PLINQ rely on the threads. The class provides a .NET application with a pool of worker threads. You also can use thread pool threads. For more information, see [The managed thread pool](the-managed-thread-pool.md). +Both TPL and PLINQ rely on the threads. The class provides a .NET application with a pool of worker threads. You can also use thread pool threads. For more information, see [The managed thread pool](the-managed-thread-pool.md). At last, you can use the class that represents a managed thread. For more information, see [Using threads and threading](using-threads-and-threading.md). diff --git a/docs/standard/threading/timers.md b/docs/standard/threading/timers.md index 9bab12b111149..024661cf828be 100644 --- a/docs/standard/threading/timers.md +++ b/docs/standard/threading/timers.md @@ -29,7 +29,7 @@ author: "pkulikov" ## The System.Threading.Timer class -The class enables you to continuously call a delegate at specified time intervals. You also can use this class to schedule a single call to a delegate in a specified time interval. The delegate is executed on a thread. +The class enables you to continuously call a delegate at specified time intervals. You can also use this class to schedule a single call to a delegate in a specified time interval. The delegate is executed on a thread. When you create a object, you specify a delegate that defines the callback method, an optional state object that is passed to the callback, the amount of time to delay before the first invocation of the callback, and the time interval between callback invocations. To cancel a pending timer, call the method. diff --git a/docs/visual-basic/programming-guide/concepts/async/handling-reentrancy-in-async-apps.md b/docs/visual-basic/programming-guide/concepts/async/handling-reentrancy-in-async-apps.md index 853e52b6788d6..093697bcfa167 100644 --- a/docs/visual-basic/programming-guide/concepts/async/handling-reentrancy-in-async-apps.md +++ b/docs/visual-basic/programming-guide/concepts/async/handling-reentrancy-in-async-apps.md @@ -122,7 +122,7 @@ Instead of disabling the **Start** button, you can keep the button active but, i For more information about cancellation, see [Fine-Tuning Your Async Application (Visual Basic)](../../../../visual-basic/programming-guide/concepts/async/fine-tuning-your-async-application.md). -To set up this scenario, make the following changes to the basic code that is provided in [Reviewing and Running the Example App](#BKMD_SettingUpTheExample). You also can download the finished app from [Async Samples: Reentrancy in .NET Desktop Apps](https://code.msdn.microsoft.com/Async-Sample-Preventing-a8489f06). The name of this project is CancelAndRestart. +To set up this scenario, make the following changes to the basic code that is provided in [Reviewing and Running the Example App](#BKMD_SettingUpTheExample). You can also download the finished app from [Async Samples: Reentrancy in .NET Desktop Apps](https://code.msdn.microsoft.com/Async-Sample-Preventing-a8489f06). The name of this project is CancelAndRestart. 1. Declare a variable, `cts`, that’s in scope for all methods.