From 6732d559c6a2b5566fe2b5d63a23906ed736937c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:35:53 -0400 Subject: [PATCH 01/28] Bump the dotnet group with 1 update (#54421) Bumps System.Threading.RateLimiting from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: System.Threading.RateLimiting dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../ConsoleAI.CustomClientMiddle.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj index 9d51b11548098..96527fac2b0f6 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj @@ -9,7 +9,7 @@ - + From f6b238dff8241af01ab56c958d352d9da84e7636 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:37:44 -0400 Subject: [PATCH 02/28] Bump the dotnet group with 2 updates (#54422) Bumps Microsoft.Extensions.Logging from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Logging.Console from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../getting-started-type-category-name.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/extensions/snippets/logging/getting-started-type-category-name/getting-started-type-category-name.csproj b/docs/core/extensions/snippets/logging/getting-started-type-category-name/getting-started-type-category-name.csproj index 1f4dd6265f502..dc0acb6fd64ff 100644 --- a/docs/core/extensions/snippets/logging/getting-started-type-category-name/getting-started-type-category-name.csproj +++ b/docs/core/extensions/snippets/logging/getting-started-type-category-name/getting-started-type-category-name.csproj @@ -8,8 +8,8 @@ - - + + From 13b6a4054e44c61b39066f087e9179b494fb212e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:04 -0400 Subject: [PATCH 03/28] Bump the dotnet group with 4 updates (#54433) Bumps Microsoft.Extensions.DependencyInjection from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Diagnostics.ResourceMonitoring from 10.6.0 to 10.7.0 Bumps Microsoft.Extensions.Hosting from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Logging.Console from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Diagnostics.ResourceMonitoring dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.Hosting dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../resource-monitoring/resource-monitoring.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj b/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj index 40f65e6c216e4..4593b310d035c 100644 --- a/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj +++ b/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj @@ -8,10 +8,10 @@ - - - - + + + + From f97f32c857db6d77abca8ce85b3d0faf23cc0afb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:13 -0400 Subject: [PATCH 04/28] Bump the dotnet group with 4 updates (#54438) Bumps Microsoft.Extensions.AI from 10.6.0 to 10.7.0 Bumps Microsoft.Extensions.AI.OpenAI from 10.6.0 to 10.7.0 Bumps Microsoft.Extensions.Configuration from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Configuration.UserSecrets from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.AI dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.AI.OpenAI dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration.UserSecrets dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../quickstarts/snippets/structured-output/SOChat.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj b/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj index 37371e88a2d64..bf7e49bcfaa08 100644 --- a/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj +++ b/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj @@ -11,10 +11,10 @@ - - - - + + + + From 4caaac10ccf2146f5d90b21379405a8787d07d1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:21 -0400 Subject: [PATCH 05/28] Bump the dotnet group with 1 update (#54442) Bumps Microsoft.Extensions.Caching.Memory from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Caching.Memory dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj index d637b65e72464..5165dab9eecf2 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj @@ -9,7 +9,7 @@ - + From d2db246c518fa9f4c96ff0ed4c971149b2989e8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:33 -0400 Subject: [PATCH 06/28] Bump the dotnet group with 1 update (#54443) Bumps Microsoft.Extensions.AsyncState from 10.6.0 to 10.7.0 --- updated-dependencies: - dependency-name: Microsoft.Extensions.AsyncState dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../csharp/AspNetCoreIntegration/AspNetCoreIntegration.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/extensions/snippets/async-state/csharp/AspNetCoreIntegration/AspNetCoreIntegration.csproj b/docs/core/extensions/snippets/async-state/csharp/AspNetCoreIntegration/AspNetCoreIntegration.csproj index c3af359935fc2..f52ac0d633aab 100644 --- a/docs/core/extensions/snippets/async-state/csharp/AspNetCoreIntegration/AspNetCoreIntegration.csproj +++ b/docs/core/extensions/snippets/async-state/csharp/AspNetCoreIntegration/AspNetCoreIntegration.csproj @@ -6,7 +6,7 @@ - + From 6324c56d9b58e39138dbd17701692762b7646e04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:44 -0400 Subject: [PATCH 07/28] Bump the dotnet group with 2 updates (#54445) Bumps Microsoft.Extensions.Configuration from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Configuration.Binder from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration.Binder dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../DictionaryBinding/DictionaryBinding.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/extensions/snippets/configuration/binding-scenarios/DictionaryBinding/DictionaryBinding.csproj b/docs/core/extensions/snippets/configuration/binding-scenarios/DictionaryBinding/DictionaryBinding.csproj index af80e28f3a09b..4b4efdfa3d435 100644 --- a/docs/core/extensions/snippets/configuration/binding-scenarios/DictionaryBinding/DictionaryBinding.csproj +++ b/docs/core/extensions/snippets/configuration/binding-scenarios/DictionaryBinding/DictionaryBinding.csproj @@ -8,8 +8,8 @@ - - + + From ccea6115a566e14124dcc844b6848ce50a17788d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:38:52 -0400 Subject: [PATCH 08/28] Bump the dotnet group with 1 update (#54449) Bumps Microsoft.Extensions.DependencyInjection from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../dependency-injection/snippets/basics/di-basics.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/extensions/dependency-injection/snippets/basics/di-basics.csproj b/docs/core/extensions/dependency-injection/snippets/basics/di-basics.csproj index bb46ed144bc4a..1c7fa5786be25 100644 --- a/docs/core/extensions/dependency-injection/snippets/basics/di-basics.csproj +++ b/docs/core/extensions/dependency-injection/snippets/basics/di-basics.csproj @@ -8,7 +8,7 @@ - + From 415a3067e10cfe5d0686c4701f5aff5bba5a9120 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:39:01 -0400 Subject: [PATCH 09/28] Bump the dotnet group with 2 updates (#54450) Bumps Microsoft.Extensions.AmbientMetadata.Build from 10.6.0 to 10.7.0 Bumps Microsoft.Extensions.Hosting from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.AmbientMetadata.Build dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.Hosting dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../buildmetadata-usebuildmetadata.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata-usebuildmetadata/buildmetadata-usebuildmetadata.csproj b/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata-usebuildmetadata/buildmetadata-usebuildmetadata.csproj index af555e337e37e..3c24d3c0f730d 100644 --- a/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata-usebuildmetadata/buildmetadata-usebuildmetadata.csproj +++ b/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata-usebuildmetadata/buildmetadata-usebuildmetadata.csproj @@ -8,8 +8,8 @@ - - + + From 8be492f296aac0dd1c4ead15c9f01ddf926a179d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:39:11 -0400 Subject: [PATCH 10/28] Bump the dotnet group with 2 updates (#54454) Bumps Microsoft.Extensions.Configuration.Binder from 10.0.8 to 10.0.9 Bumps Microsoft.Extensions.Hosting from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration.Binder dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Hosting dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../dependency-injection/snippets/console/console-di.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/extensions/dependency-injection/snippets/console/console-di.csproj b/docs/core/extensions/dependency-injection/snippets/console/console-di.csproj index d478447db2d51..95db851be3e58 100644 --- a/docs/core/extensions/dependency-injection/snippets/console/console-di.csproj +++ b/docs/core/extensions/dependency-injection/snippets/console/console-di.csproj @@ -9,8 +9,8 @@ - - + + From 180a8ba20e7646b674da62056fe5f616bb1ae162 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:39:27 -0400 Subject: [PATCH 11/28] Bump the dotnet group with 2 updates (#54455) Bumps Microsoft.Extensions.AI from 10.6.0 to 10.7.0 Bumps Microsoft.Extensions.AI.OpenAI from 10.6.0 to 10.7.0 --- updated-dependencies: - dependency-name: Microsoft.Extensions.AI dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.AI.OpenAI dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../snippets/conceptual/VectorStoreSnippets.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj index 86bf9f6a9531f..fcb52214d0132 100644 --- a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj +++ b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj @@ -9,8 +9,8 @@ - - + + From 8daa5bc776889a146b335ab04dd8e80d1f065567 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:39:31 -0400 Subject: [PATCH 12/28] Bump the dotnet group with 3 updates (#54456) Bumps Microsoft.Extensions.AI.OpenAI from 10.5.0 to 10.7.0 Bumps Microsoft.Extensions.Configuration from 10.0.7 to 10.0.9 Bumps Microsoft.Extensions.Configuration.UserSecrets from 10.0.7 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.AI.OpenAI dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration.UserSecrets dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../snippets/chat-with-data/openai/VectorDataAI.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj b/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj index 72410ef49212c..9d1ab9069f6c2 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj +++ b/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj @@ -9,9 +9,9 @@ - - - + + + From b90446bb4e577aebb0167608862aebb86a0175c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:39:44 -0400 Subject: [PATCH 13/28] Bump the dotnet group with 1 update (#54461) Bumps Microsoft.Extensions.Configuration from 10.0.8 to 10.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration dependency-version: 10.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../console-basic-builder/console-basic-builder.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/extensions/snippets/configuration/console-basic-builder/console-basic-builder.csproj b/docs/core/extensions/snippets/configuration/console-basic-builder/console-basic-builder.csproj index 6d8c75bbce702..a188d03bad934 100644 --- a/docs/core/extensions/snippets/configuration/console-basic-builder/console-basic-builder.csproj +++ b/docs/core/extensions/snippets/configuration/console-basic-builder/console-basic-builder.csproj @@ -9,7 +9,7 @@ - + From e8562f56e9cab1f3206aa52576a31c650641bd99 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:49:51 -0700 Subject: [PATCH 14/28] Remove references to ai-samples (archived repo) (#54412) --- .openpublishing.redirection.ai.json | 4 ++++ docs/ai/evaluation/libraries.md | 9 ++++++--- docs/ai/index.yml | 2 -- docs/ai/microsoft-extensions-ai.md | 2 +- docs/ai/resources/get-started.md | 23 ----------------------- docs/ai/toc.yml | 2 -- 6 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 docs/ai/resources/get-started.md diff --git a/.openpublishing.redirection.ai.json b/.openpublishing.redirection.ai.json index 0d717d29c46bb..47c7bcdc01924 100644 --- a/.openpublishing.redirection.ai.json +++ b/.openpublishing.redirection.ai.json @@ -95,6 +95,10 @@ "redirect_url": "/dotnet/ai/quickstarts/prompt-model", "redirect_document_id": true }, + { + "source_path_from_root": "/docs/ai/resources/get-started.md", + "redirect_url": "/dotnet/ai/overview" + }, { "source_path_from_root": "/docs/ai/semantic-kernel-dotnet-overview.md", "redirect_url": "/semantic-kernel/overview" diff --git a/docs/ai/evaluation/libraries.md b/docs/ai/evaluation/libraries.md index d7f717ef7524b..f98166c11c926 100644 --- a/docs/ai/evaluation/libraries.md +++ b/docs/ai/evaluation/libraries.md @@ -93,11 +93,14 @@ The `dotnet aieval` tool, which ships as part of the `Microsoft.Extensions.AI.Ev The libraries are flexible and you can pick the components you need. For example, disable response caching or tailor reporting to work best in your environment. You can also customize and configure your evaluations, for example, by adding customized metrics and reporting options. -## Samples +## Usage examples -For a more comprehensive tour of the functionality and APIs in the Microsoft.Extensions.AI.Evaluation libraries, see the [API usage examples (dotnet/ai-samples repo)](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/). These examples are a collection of unit tests. Each unit test showcases a specific concept or API and builds on the concepts and APIs showcased in previous unit tests. +For usage examples, see the following tutorials: + +- [Quickstart: Evaluate response quality](evaluate-ai-response.md) +- [Tutorial: Evaluate response quality with caching and reporting](evaluate-with-reporting.md) +- [Tutorial: Evaluate response safety with caching and reporting](evaluate-safety.md) ## See also -- [Quickstart: Evaluate response quality](evaluate-ai-response.md) - [Evaluation of generative AI apps (Foundry)](/azure/ai-studio/concepts/evaluation-approach-gen-ai) diff --git a/docs/ai/index.yml b/docs/ai/index.yml index 393f59396a2fd..4670e2c37b67e 100644 --- a/docs/ai/index.yml +++ b/docs/ai/index.yml @@ -101,8 +101,6 @@ landingContent: linkLists: - linkListType: sample links: - - text: Get started resources - url: resources/get-started.md - text: Azure AI resources url: resources/azure-ai.md - text: MCP server resources diff --git a/docs/ai/microsoft-extensions-ai.md b/docs/ai/microsoft-extensions-ai.md index 59a8c8e5ddc32..9481fd69e52d8 100644 --- a/docs/ai/microsoft-extensions-ai.md +++ b/docs/ai/microsoft-extensions-ai.md @@ -57,7 +57,7 @@ You can start building with `Microsoft.Extensions.AI` in the following ways: - **Application developers**: Use the abstractions to simplify integration into your apps. This enables portability across models and services, facilitates testing and mocking, leverages middleware provided by the ecosystem, and maintains a consistent API throughout your app, even if you use different services in different parts of your application. - **Ecosystem contributors**: If you're interested in contributing to the ecosystem, consider writing custom middleware components. -For more samples, see the [dotnet/ai-samples](https://aka.ms/meai-samples) GitHub repository. For an end-to-end sample, see [eShopSupport](https://github.com/dotnet/eShopSupport). +For an end-to-end sample, see [eShopSupport](https://github.com/dotnet/eShopSupport). ## See also diff --git a/docs/ai/resources/get-started.md b/docs/ai/resources/get-started.md deleted file mode 100644 index 5355431a089c4..0000000000000 --- a/docs/ai/resources/get-started.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Learning resources to get started with AI in .NET -description: This article provides a list of resources for .NET developers who are starting to build AI apps with .NET. -ms.date: 09/04/2025 -ms.topic: reference ---- - -# Learning resources to get started with AI in .NET - -This article contains an organized list of the best learning resources for .NET developers who are starting to build AI apps with .NET. Resources include samples, documentation, videos, and workshops. - -## Tutorials - -- [Generative AI for beginners](https://github.com/microsoft/Generative-AI-for-beginners-dotnet) - -## Workshops - -- [AI workshop](https://github.com/dotnet-presentations/ai-workshop) -- [Steve Sanderson's AI workshop](https://github.com/SteveSandersonMS/dotnet-ai-workshop) - -## Sample apps - -- [AI samples for .NET](https://github.com/dotnet/ai-samples) diff --git a/docs/ai/toc.yml b/docs/ai/toc.yml index 2a79d60b16b14..553909c99e1b6 100644 --- a/docs/ai/toc.yml +++ b/docs/ai/toc.yml @@ -151,8 +151,6 @@ items: href: evaluation/evaluate-safety.md - name: Resources items: - - name: Get started resources - href: resources/get-started.md - name: Azure AI resources href: resources/azure-ai.md - name: MCP server resources From 2438a1ad013ff462daeaaafb0334ce7b25795b58 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:52:04 -0700 Subject: [PATCH 15/28] Remove supplemental API remarks (#54411) --- .openpublishing.redirection.fundamentals.json | 756 ++++++++++- .../core-libraries/8.0/complex-format.md | 2 +- .../porting/net-framework-tech-unavailable.md | 4 +- docs/core/whats-new/dotnet-9/libraries.md | 2 +- .../language-reference/builtin-types/enum.md | 2 +- docs/csharp/toc.yml | 4 - docs/framework/app-domains/toc.yml | 4 - docs/framework/network-programming/toc.yml | 4 - .../includes/c-and-posix-cultures.md | 2 - .../includes/calendar-era.md | 3 - .../runtime-libraries/includes/context.md | 2 - .../includes/interpolated-strings.md | 2 - .../includes/stringbuilder-perf-note.md | 27 - .../includes/system-drawing-common.md | 2 - .../includes/unicode-categories.md | 19 - .../includes/untrusted-data-class-note.md | 2 - .../runtime-libraries/media/gdip-art10.gif | Bin 1121 -> 0 bytes .../runtime-libraries/media/gdip-art12.gif | Bin 1112 -> 0 bytes .../microsoft-win32-registry.md | 36 - .../List/Overview/vb/Project.vbproj | 8 - .../List/Overview/vb/module1.vb | 183 --- .../List/Overview/vb/source.vb | 100 -- .../ListT/Overview/csharp/Project.csproj | 8 - .../ListT/Overview/csharp/program.cs | 142 --- .../ListT/Overview/csharp/source.cs | 108 -- .../ListT/Overview/fsharp/addremoveinsert.fs | 66 - .../ListT/Overview/fsharp/listclass.fs | 100 -- .../DataTable/Overview/cs/project.csproj | 9 - .../DataTable/Overview/cs/source.cs | 167 --- .../DataTable/Overview/vb/Project.vbproj | 8 - .../DataTable/Overview/vb/source.vb | 137 -- .../Overview/csharp/Project.csproj | 9 - .../EventSource/Overview/csharp/program.cs | 31 - .../EventSource/Overview/csharp/program1.cs | 102 -- .../EventSource/Overview/csharp/program2.cs | 199 --- .../EventSource/Overview/vb/Project.vbproj | 8 - .../EventSource/Overview/vb/program.vb | 36 - .../EventSource/Overview/vb/program1.vb | 118 -- .../Overview/csharp/Project.csproj | 12 - .../Overview/csharp/averagecount32.cs | 169 --- .../NextValue/csharp/Project.csproj | 12 - .../NextValue/csharp/elapsedtime.cs | 225 ---- .../Overview/csharp/Project.csproj | 12 - .../Overview/csharp/averagetimer32.cs | 370 ------ .../Overview/csharp/numberofitems32.cs | 137 -- .../Overview/csharp/numberofitems64.cs | 134 -- .../Overview/csharp/program.cs | 155 --- .../csharp/rateofcountspersecond32.cs | 159 --- .../csharp/rateofcountspersecond64.cs | 159 --- .../Overview/csharp/rawfraction.cs | 172 --- .../Overview/vb/Project.vbproj | 12 - .../Overview/vb/averagecount32.vb | 149 --- .../Overview/vb/averagetimer32.vb | 392 ------ .../Overview/vb/elapsedtime.vb | 237 ---- .../Overview/vb/numberofitems32.vb | 131 -- .../Overview/vb/numberofitems64.vb | 126 -- .../Overview/vb/program.vb | 153 --- .../Overview/vb/rateofcountspersecond32.vb | 151 --- .../Overview/vb/rateofcountspersecond64.vb | 151 --- .../Overview/vb/rawfraction.vb | 162 --- .../Matrix/Overview/csharp/Class1.cs | 128 -- .../Matrix/Overview/csharp/Project.csproj | 9 - .../Matrix/Overview/vb/Class1.vb | 128 -- .../Matrix/Overview/vb/Project.vbproj | 9 - .../Overview/csharp/Project.csproj | 8 - .../ExpandoObject/Overview/csharp/program.cs | 126 -- .../ExpandoObject/Overview/vb/Project.vbproj | 8 - .../ExpandoObject/Overview/vb/module1.vb | 109 -- .../CurrentCulture/csharp/Async1.cs | 39 - .../CultureInfo/CurrentCulture/csharp/Get1.cs | 15 - .../CurrentCulture/csharp/Project.csproj | 8 - .../CurrentCulture/csharp/aspculture13.cs | 20 - .../CurrentCulture/csharp/changeculture11.cs | 33 - .../CurrentCulture/csharp/specific12.cs | 26 - .../CultureInfo/CurrentCulture/vb/Async1.vb | 42 - .../CultureInfo/CurrentCulture/vb/Get1.vb | 16 - .../CultureInfo/CurrentCulture/vb/Program.vb | 5 - .../CurrentCulture/vb/Project.vbproj | 8 - .../CurrentCulture/vb/aspculture13.vb | 23 - .../CurrentCulture/vb/changeculture11.vb | 35 - .../CurrentCulture/vb/specific12.vb | 30 - .../CurrentUICulture/csharp/Async1.cs | 39 - .../CurrentUICulture/csharp/Get1.cs | 15 - .../CurrentUICulture/csharp/Project.csproj | 8 - .../csharp/currentuiculture1.cs | 18 - .../CultureInfo/CurrentUICulture/vb/Async1.vb | 42 - .../CultureInfo/CurrentUICulture/vb/Get1.vb | 16 - .../CurrentUICulture/vb/Project.vbproj | 8 - .../CurrentUICulture/vb/currentuiculture1.vb | 20 - .../InvariantCulture/csharp/Project.csproj | 8 - .../InvariantCulture/csharp/persist1.cs | 50 - .../InvariantCulture/vb/Project.vbproj | 8 - .../InvariantCulture/vb/persist1.vb | 53 - .../CultureInfo/csharp/appdomainex1.cs | 77 -- .../CultureInfo/csharp/asyncculture1.cs | 66 - .../CultureInfo/csharp/asyncculture3.cs | 67 - .../CultureInfo/csharp/change1.cs | 24 - .../CultureInfo/csharp/changeui1.cs | 24 - .../CultureInfo/csharp/current1.cs | 19 - .../CultureInfo/csharp/currentui1.cs | 19 - .../CultureInfo/csharp/defaultthread1.cs | 67 - .../CultureInfo/csharp/getcultures1.cs | 44 - .../CultureInfo/csharp/project.csproj | 8 - .../CultureInfo/csharp/setthreads1.cs | 67 - .../DateTimeFormatInfo/csharp/create1.cs | 112 -- .../DateTimeFormatInfo/csharp/create2.cs | 25 - .../DateTimeFormatInfo/csharp/example1.cs | 28 - .../DateTimeFormatInfo/csharp/example2.cs | 39 - .../DateTimeFormatInfo/csharp/example3.cs | 23 - .../DateTimeFormatInfo/csharp/example4.cs | 47 - .../DateTimeFormatInfo/csharp/example5.cs | 47 - .../csharp/formatprovider1.cs | 42 - .../DateTimeFormatInfo/csharp/instantiate2.cs | 21 - .../DateTimeFormatInfo/csharp/instantiate3.cs | 32 - .../DateTimeFormatInfo/csharp/instantiate6.cs | 119 -- .../DateTimeFormatInfo/csharp/parse1.cs | 45 - .../DateTimeFormatInfo/csharp/parse2.cs | 36 - .../DateTimeFormatInfo/csharp/project.csproj | 9 - .../DateTimeFormatInfo/csharp/serialize1.cs | 28 - .../DateTimeFormatInfo/csharp/serialize2.cs | 29 - .../csharp/customize_currency1.cs | 42 - .../NumberFormatInfo/csharp/customize_ssn1.cs | 37 - .../csharp/formatprovider1.cs | 42 - .../NumberFormatInfo/csharp/instantiate1.cs | 23 - .../NumberFormatInfo/csharp/instantiate2.cs | 21 - .../NumberFormatInfo/csharp/instantiate3.cs | 32 - .../NumberFormatInfo/csharp/instantiate4.cs | 25 - .../NumberFormatInfo/csharp/instantiate5.cs | 33 - .../NumberFormatInfo/csharp/instantiate6.cs | 86 -- .../NumberFormatInfo/csharp/parse1.cs | 40 - .../NumberFormatInfo/csharp/parsepersisted.cs | 80 -- .../NumberFormatInfo/csharp/parseuser1.cs | 43 - .../NumberFormatInfo/csharp/project.csproj | 9 - .../NumberFormatInfo/csharp/properties1.cs | 41 - .../NumberFormatInfo/csharp/properties2.cs | 22 - .../RegionInfo/csharp/Project.csproj | 8 - .../RegionInfo/csharp/propertyvalues1.cs | 46 - .../Overview/csharp/BigInteger_Examples.cs | 86 -- .../Overview/csharp/ByteAndHex_Examples.cs | 152 --- .../Overview/csharp/ByteAndHex_Examples2.cs | 43 - .../Overview/csharp/Mutability_Examples.cs | 75 -- .../BigInteger/Overview/csharp/Project.csproj | 8 - .../Overview/vb/BigInteger_Examples.vb | 86 -- .../Overview/vb/ByteAndHex_Examples.vb | 154 --- .../Overview/vb/ByteAndHex_Examples2.vb | 45 - .../Overview/vb/Mutability_Examples.vb | 69 - .../BigInteger/Overview/vb/Project.vbproj | 8 - .../Complex/Overview/csharp/Program.cs | 1 - .../Complex/Overview/csharp/Project.csproj | 8 - .../Complex/Overview/csharp/create1.cs | 41 - .../Complex/Overview/csharp/customfmt1.cs | 85 -- .../Complex/Overview/csharp/nan1.cs | 28 - .../Complex/Overview/csharp/precision1.cs | 35 - .../Complex/Overview/vb/Program.vb | 5 - .../Complex/Overview/vb/Project.vbproj | 8 - .../Complex/Overview/vb/create1.vb | 41 - .../Complex/Overview/vb/customfmt1.vb | 76 -- .../Complex/Overview/vb/nan1.vb | 29 - .../Complex/Overview/vb/precision1.vb | 35 - .../DynamicMethod/.ctor/csharp/Project.csproj | 8 - .../DynamicMethod/.ctor/csharp/source.cs | 145 --- .../DynamicMethod/.ctor/csharp/source1.cs | 80 -- .../DynamicMethod/.ctor/vb/Project.vbproj | 8 - .../DynamicMethod/.ctor/vb/source.vb | 157 --- .../DynamicMethod/.ctor/vb/source1.vb | 92 -- .../Overview/csharp/Project.csproj | 8 - .../DynamicMethod/Overview/csharp/source.cs | 256 ---- .../DynamicMethod/Overview/vb/Project.vbproj | 8 - .../DynamicMethod/Overview/vb/source.vb | 246 ---- .../Overview/csharp/CreateAndRunAssembly.cs | 56 - .../csharp/GenerateMetadataSnippets.cs | 122 -- .../Overview/csharp/Project.csproj | 11 - .../CurrentCulture/Overview/vb/Project.vbproj | 8 - .../CurrentCulture/Overview/vb/example.vb | 34 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/resourcenames.cs | 37 - .../Overview/csharp/showdate.cs | 41 - .../Overview/csharp/showdate1.cs | 38 - .../Overview/csharp/showdate2.cs | 31 - .../Overview/csharp/showtime.cs | 17 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/resourcenames.vb | 37 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/example.cs | 30 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/example.vb | 30 - .../.ctor/csharp/Project.csproj | 8 - .../ResourceManager/.ctor/csharp/ctor1.cs | 15 - .../ResourceManager/.ctor/csharp/example.cs | 23 - .../ResourceManager/.ctor/csharp/greet.cs | 51 - .../ResourceManager/.ctor/vb/Project.vbproj | 8 - .../ResourceManager/.ctor/vb/example.vb | 24 - .../ResourceManager/.ctor/vb/greet.vb | 51 - .../GetObject/csharp/Project.csproj | 13 - .../GetObject/csharp/createresources.cs | 64 - .../GetObject/csharp/numberinfo.cs | 33 - .../GetObject/csharp/shownumbers.cs | 74 -- .../GetObject/vb/Project.vbproj | 12 - .../GetObject/vb/createresources.vb | 61 - .../ResourceManager/GetObject/vb/example.vb | 44 - .../ResourceManager/GetObject/vb/example2.vb | 55 - .../GetObject/vb/numberinfo.vb | 29 - .../GetObject/vb/shownumbers.vb | 73 -- .../GetString/vb/Project.vbproj | 8 - .../ResourceManager/GetString/vb/showdate.vb | 42 - .../ResourceManager/GetString/vb/showdate2.vb | 31 - .../Overview/csharp/Project.csproj | 12 - .../ResourceManager/Overview/csharp/ctor1.cs | 30 - .../Overview/csharp/example.cs | 41 - .../Overview/csharp/example1.cs | 26 - .../Overview/csharp/example11.cs | 41 - .../Overview/csharp/example2.cs | 56 - .../ResourceManager/Overview/csharp/rmc.cs | 67 - .../Overview/vb/Project.vbproj | 8 - .../ResourceManager/Overview/vb/ctor1.vb | 26 - .../Overview/vb/resourcenames.vb | 37 - .../ResourceManager/Overview/vb/rmc.vb | 61 - .../ResourceManager/Overview/vb/showdate.vb | 42 - .../ResourceManager/Overview/vb/showtime.vb | 16 - .../Overview/csharp/Project.csproj | 12 - .../ResourceReader/Overview/csharp/class1.cs | 36 - .../Overview/csharp/createresourceex1.cs | 32 - .../ResourceReader/Overview/csharp/ctor1.cs | 52 - .../Overview/csharp/readresourceex1.cs | 91 -- .../ResourceReader/Overview/vb/Project.vbproj | 8 - .../ResourceReader/Overview/vb/class1.vb | 37 - .../ResourceReader/Overview/vb/ctor1.vb | 46 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/multiple1.cs | 23 - .../Overview/csharp/multiple2.cs | 26 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/multiple1.vb | 21 - .../Overview/vb/multiple2.vb | 23 - .../GetHashCode/csharp/Project.csproj | 8 - .../GetHashCode/csharp/gethashcodeex1.cs | 51 - .../GetHashCode/vb/Project.vbproj | 8 - .../GetHashCode/vb/gethashcodeex1.vb | 52 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/source.cs | 65 - .../Overview/vb/Project.vbproj | 8 - .../ICustomMarshaler/Overview/vb/source.vb | 47 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/apply1.cs | 56 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/apply1.vb | 57 - .../Regex/Match/csharp/Project.csproj | 8 - .../Regex/Match/csharp/startat.cs | 20 - .../Regex/Overview/csharp/Project.csproj | 8 - .../Regex/Overview/csharp/caching1.cs | 55 - .../Regex/Overview/csharp/regex_example1.cs | 62 - .../Regex/Overview/csharp/words.cs | 45 - .../Regex/Overview/vb/Project.vbproj | 8 - .../Regex/Overview/vb/regex_example1.vb | 63 - .../Regex/Overview/vb/words.vb | 49 - .../Encoding/Overview/csharp/Project.csproj | 8 - .../Encoding/Overview/csharp/getencoding1.cs | 90 -- .../Encoding/Overview/vb/Project.vbproj | 8 - .../Encoding/Overview/vb/getencoding1.vb | 90 -- .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/caching1.vb | 53 - .../Overview/csharp/CountLettersInSpan.cs | 48 - .../Overview/csharp/CountLettersInString.cs | 48 - .../Rune/Overview/csharp/EncodeRune.cs | 34 - .../Rune/Overview/csharp/FindFirstLetter.cs | 30 - .../Rune/Overview/csharp/InstantiateRunes.cs | 37 - .../Rune/Overview/csharp/Project.csproj | 8 - .../Rune/Overview/csharp/SplitStringOnChar.cs | 24 - .../csharp/TrimNonLettersAndNonDigits.cs | 50 - .../Overview/csharp/WorkWithSurrogates.cs | 59 - .../Overview/fsharp/CountLettersInString.fs | 28 - .../Overview/csharp/Project.csproj | 9 - .../StringBuilder/Overview/csharp/call1.cs | 19 - .../StringBuilder/Overview/csharp/call2.cs | 17 - .../StringBuilder/Overview/csharp/chars1.cs | 46 - .../StringBuilder/Overview/csharp/default1.cs | 45 - .../StringBuilder/Overview/csharp/delete1.cs | 44 - .../StringBuilder/Overview/csharp/expand1.cs | 49 - .../Overview/csharp/immutability2.cs | 21 - .../Overview/csharp/instantiate1.cs | 48 - .../StringBuilder/Overview/csharp/pattern1.cs | 66 - .../StringBuilder/Overview/csharp/pattern2.cs | 45 - .../StringBuilder/Overview/csharp/pattern3.cs | 48 - .../StringBuilder/Overview/csharp/pattern4.cs | 41 - .../StringBuilder/Overview/csharp/replace1.cs | 16 - .../StringBuilder/Overview/fsharp/call1.fs | 13 - .../StringBuilder/Overview/fsharp/call2.fs | 16 - .../StringBuilder/Overview/fsharp/chars1.fs | 38 - .../StringBuilder/Overview/fsharp/default1.fs | 36 - .../StringBuilder/Overview/fsharp/delete1.fs | 35 - .../StringBuilder/Overview/fsharp/expand1.fs | 49 - .../Overview/fsharp/immutability2.fs | 14 - .../Overview/fsharp/instantiate1.fs | 37 - .../StringBuilder/Overview/fsharp/pattern1.fs | 46 - .../StringBuilder/Overview/fsharp/pattern2.fs | 45 - .../StringBuilder/Overview/fsharp/pattern3.fs | 45 - .../StringBuilder/Overview/fsharp/pattern4.fs | 43 - .../StringBuilder/Overview/fsharp/replace1.fs | 11 - .../StringBuilder/Overview/vb/Project.vbproj | 8 - .../StringBuilder/Overview/vb/call1.vb | 19 - .../StringBuilder/Overview/vb/call2.vb | 17 - .../StringBuilder/Overview/vb/chars1.vb | 46 - .../StringBuilder/Overview/vb/default1.vb | 43 - .../StringBuilder/Overview/vb/delete1.vb | 44 - .../StringBuilder/Overview/vb/expand1.vb | 49 - .../StringBuilder/Overview/vb/instantiate1.vb | 49 - .../StringBuilder/Overview/vb/pattern1.vb | 60 - .../StringBuilder/Overview/vb/pattern2.vb | 43 - .../StringBuilder/Overview/vb/pattern3.vb | 42 - .../StringBuilder/Overview/vb/pattern4.vb | 40 - .../StringBuilder/Overview/vb/replace1.vb | 16 - .../Task/Overview/csharp/Project.csproj | 8 - .../Task/Overview/csharp/Wait1.cs | 27 - .../Task/Overview/csharp/Wait2.cs | 30 - .../Task/Overview/csharp/WaitAll1.cs | 44 - .../Task/Overview/csharp/WaitAll2.cs | 104 -- .../Task/Overview/csharp/WhenAny1.cs | 86 -- .../Task/Overview/csharp/run1.cs | 20 - .../Task/Overview/csharp/startnew.cs | 57 - .../Task/Overview/csharp/startnew1.cs | 22 - .../Task/Overview/fsharp/Wait1.fs | 22 - .../Task/Overview/fsharp/Wait2.fs | 25 - .../Task/Overview/fsharp/WaitAll1.fs | 38 - .../Task/Overview/fsharp/WaitAll2.fs | 86 -- .../Task/Overview/fsharp/WhenAny1.fs | 81 -- .../Task/Overview/fsharp/run1.fs | 17 - .../Task/Overview/fsharp/startnew.fs | 46 - .../Task/Overview/fsharp/startnew1.fs | 16 - .../Task/Overview/vb/Project.vbproj | 8 - .../Task/Overview/vb/Wait1.vb | 24 - .../Task/Overview/vb/Wait2.vb | 28 - .../Task/Overview/vb/WaitAll1.vb | 42 - .../Task/Overview/vb/WaitAll2.vb | 98 -- .../Task/Overview/vb/WaitAny1.vb | 35 - .../Task/Overview/vb/run1.vb | 22 - .../Task/Overview/vb/startnew.vb | 54 - .../Task/Overview/vb/startnew1.vb | 22 - .../csharp/Project.csproj | 9 - .../csharp/app.config | 3 - .../csharp/app.xaml | 9 - .../csharp/app.xaml.cs | 17 - .../csharp/mainwindow.xaml | 14 - .../csharp/mainwindow.xaml.cs | 157 --- .../Overview/vb/Application.xaml | 9 - .../Overview/vb/Application.xaml.vb | 6 - .../TaskScheduler/Overview/vb/AssemblyInfo.vb | 11 - .../TaskScheduler/Overview/vb/MainWindow.xaml | 14 - .../Overview/vb/MainWindow.xaml.vb | 143 --- .../TaskScheduler/Overview/vb/WpfApp.vbproj | 22 - .../Monitor/Overview/csharp/Pattern2.cs | 34 - .../Monitor/Overview/csharp/Project.csproj | 8 - .../Monitor/Overview/csharp/badbox1.cs | 46 - .../Monitor/Overview/csharp/badlock1.cs | 62 - .../Monitor/Overview/csharp/example1.cs | 63 - .../Monitor/Overview/csharp/source.cs | 111 -- .../Monitor/Overview/vb/Pattern2.vb | 32 - .../Monitor/Overview/vb/Project.vbproj | 8 - .../Monitor/Overview/vb/badbox1.vb | 47 - .../Monitor/Overview/vb/badlock1.vb | 60 - .../Monitor/Overview/vb/example1.vb | 66 - .../Monitor/Overview/vb/source.vb | 110 -- .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/classexample1.cs | 242 ---- .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/classexample1.vb | 211 ---- .../Thread/Overview/csharp/BackgroundEx1.cs | 36 - .../Thread/Overview/csharp/Instance1.cs | 63 - .../Thread/Overview/csharp/Project.csproj | 8 - .../Thread/Overview/csharp/ThreadStart1.cs | 43 - .../Thread/Overview/csharp/ThreadStart2.cs | 49 - .../Thread/Overview/csharp/source.cs | 44 - .../Thread/Overview/fsharp/BackgroundEx1.fs | 25 - .../Thread/Overview/fsharp/Instance1.fs | 55 - .../Thread/Overview/fsharp/ThreadStart1.fs | 35 - .../Thread/Overview/fsharp/ThreadStart2.fs | 41 - .../Thread/Overview/fsharp/source.fs | 38 - .../Thread/Overview/vb/BackgroundEx1.vb | 39 - .../Thread/Overview/vb/Instance1.vb | 63 - .../Thread/Overview/vb/Project.vbproj | 8 - .../Thread/Overview/vb/ThreadStart1.vb | 46 - .../Thread/Overview/vb/ThreadStart2.vb | 51 - .../Thread/Overview/vb/source.vb | 45 - .../XmlSchemaSet/Overview/vb/project.vbproj | 9 - .../Overview/vb/validschemaset.vb | 46 - .../XmlSchemaSet/Overview/xml/books.xsd | 32 - .../Overview/xml/booksschemafail.xml | 26 - .../XmlDocument/Overview/csharp/app.config | 3 - .../XmlDocument/Overview/csharp/booksdata.xml | 36 - .../XmlDocument/Overview/csharp/booksdata.xsd | 23 - .../XmlDocument/Overview/csharp/constants.cs | 24 - .../Overview/csharp/deleteicon.png | Bin 1276 -> 0 bytes .../XmlDocument/Overview/csharp/downarrow.png | Bin 2081 -> 0 bytes .../XmlDocument/Overview/csharp/form1.cs | 820 ------------ .../Overview/csharp/form1.designer.cs | 1121 ----------------- .../XmlDocument/Overview/csharp/form1.resx | 279 ---- .../Overview/csharp/output-build.txt | 3 - .../Overview/csharp/packages.config | 8 - .../XmlDocument/Overview/csharp/program.cs | 21 - .../Overview/csharp/refreshtree.png | Bin 1970 -> 0 bytes .../XmlDocument/Overview/csharp/save.png | Bin 2081 -> 0 bytes .../XmlDocument/Overview/csharp/source.cs | 21 - .../XmlDocument/Overview/csharp/source1.cs | 21 - .../XmlDocument/Overview/csharp/source2.cs | 27 - .../XmlDocument/Overview/csharp/source3.cs | 21 - .../XmlDocument/Overview/csharp/source4.cs | 21 - .../XmlDocument/Overview/csharp/source5.cs | 21 - .../XmlDocument/Overview/csharp/source6.cs | 27 - .../XmlDocument/Overview/csharp/uparrow.png | Bin 1923 -> 0 bytes .../Overview/csharp/xmlhelpermethods.cs | 635 ---------- .../Overview/csharp/xmlprocessingapp.csproj | 10 - .../Overview/vb/Non-WinForms/project.vbproj | 9 - .../vb/Non-WinForms/source-element.vb | 19 - .../vb/Non-WinForms/source-lastchild.vb | 21 - .../vb/Non-WinForms/source-nextsibling.vb | 20 - .../Overview/vb/Non-WinForms/source-tag.vb | 21 - .../Overview/vb/Non-WinForms/source2.vb | 29 - .../Overview/vb/Non-WinForms/source5.vb | 18 - .../Overview/vb/WinForms/booksdata.xml | 36 - .../Overview/vb/WinForms/booksdata.xsd | 23 - .../Overview/vb/WinForms/constants.vb | 17 - .../Overview/vb/WinForms/downarrow.png | Bin 2081 -> 0 bytes .../Overview/vb/WinForms/form1.designer.vb | 1043 --------------- .../Overview/vb/WinForms/form1.resx | 279 ---- .../XmlDocument/Overview/vb/WinForms/form1.vb | 715 ----------- .../my project/application.designer.vb | 38 - .../vb/WinForms/my project/assemblyinfo.vb | 34 - .../WinForms/my project/resources.designer.vb | 62 - .../vb/WinForms/my project/resources.resx | 117 -- .../WinForms/my project/settings.designer.vb | 73 -- .../Overview/vb/WinForms/refreshtree.png | Bin 1970 -> 0 bytes .../XmlDocument/Overview/vb/WinForms/save.png | Bin 2081 -> 0 bytes .../Overview/vb/WinForms/snippets.5000.json | 3 - .../Overview/vb/WinForms/source.vb | 30 - .../Overview/vb/WinForms/uparrow.png | Bin 1923 -> 0 bytes .../Overview/vb/WinForms/xmlhelpermethods.vb | 559 -------- .../vb/WinForms/xmlprocessingappvb.vbproj | 141 --- .../csharp/PreviousSibling/Project.csproj | 8 - .../csharp/PreviousSibling/source.cs | 21 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/XmlReader_Create.cs | 217 ---- .../XmlReader/Create/csharp/Project.csproj | 8 - .../Create/csharp/factory_rdr_cctor2.cs | 30 - .../Create/csharp/factory_rdr_cctor21.cs | 30 - .../XmlReader/Create/vb/Project.vbproj | 8 - .../XmlReader/Create/vb/XmlReader_Create.vb | 202 --- .../XmlReader/Create/vb/factory_rdr_cctor2.vb | 35 - .../XmlReader/Overview/csharp/Project.csproj | 8 - .../Overview/csharp/XmlReader_Basic.cs | 352 ------ .../XmlReader/Overview/csharp/program.cs | 188 --- .../Overview/csharp/readElementContentAs.cs | 138 -- .../XmlReader/Overview/vb/Project.vbproj | 8 - .../XmlReader/Overview/vb/module1.vb | 170 --- .../Overview/vb/readElementContentAs.vb | 148 --- .../XmlReader/Overview/vb/xmlreader_basic.vb | 353 ------ .../XmlReader/Overview/xml/dataFile.xml | 13 - .../XmlReader/Overview/xml/hireDate.xml | 9 - .../XmlReader/Overview/xml/hireDate.xsd | 14 - .../XmlReader/Overview/xml/hireDate_1.xml | 7 - .../XmlReader/Overview/xml/item.xml | 7 - .../XmlReader/Overview/xml/item.xsd | 15 - .../ValidationType/csharp/Project.csproj | 8 - .../ValidationType/csharp/validschemaset.cs | 45 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/Xslt_Load_v2.cs | 198 --- .../XmlResolver/Overview/vb/Project.vbproj | 8 - .../XmlResolver/Overview/vb/Xslt_Load_v2.vb | 203 --- .../Overview/vb/factory_rdr_cctor2.vb | 35 - .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/XmlSecureResolver_ex.cs | 90 -- .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/XmlSecureResolver_ex.vb | 86 -- .../XmlWriter/Overview/csharp/Project.csproj | 8 - .../XmlWriter/Overview/csharp/writer_v2.cs | 284 ----- .../XmlWriter/Overview/vb/Project.vbproj | 8 - .../XmlWriter/Overview/vb/writer_v2.vb | 256 ---- .../AppContext/Overview/csharp/V1/Example4.cs | 37 - .../Overview/csharp/V1/Project.csproj | 9 - .../AppContext/Overview/csharp/V2/Example6.cs | 37 - .../Overview/csharp/V2/Project.csproj | 9 - .../AppContext/Overview/csharp/V3/Example8.cs | 41 - .../Overview/csharp/V3/Project.csproj | 9 - .../AppContext/Overview/fsharp/Example4.fs | 30 - .../AppContext/Overview/fsharp/Example6.fs | 30 - .../AppContext/Overview/fsharp/Example8.fs | 18 - .../AppContext/Overview/vb/V1/Example4.vb | 32 - .../AppContext/Overview/vb/V1/Project.vbproj | 9 - .../AppContext/Overview/vb/V2/Example6.vb | 32 - .../AppContext/Overview/vb/V2/Project.vbproj | 9 - .../AppContext/Overview/vb/V3/Example8.vb | 37 - .../AppContext/Overview/vb/V3/Project.vbproj | 9 - .../Boolean/Overview/csharp/Project.csproj | 9 - .../System/Boolean/Overview/csharp/binary1.cs | 35 - .../Boolean/Overview/csharp/conversion1.cs | 32 - .../Boolean/Overview/csharp/conversion3.cs | 32 - .../System/Boolean/Overview/csharp/format3.cs | 73 -- .../Boolean/Overview/csharp/operations1.cs | 92 -- .../Boolean/Overview/csharp/operations2.cs | 23 - .../System/Boolean/Overview/csharp/parse2.cs | 66 - .../System/Boolean/Overview/csharp/parse3.cs | 29 - .../System/Boolean/Overview/csharp/size1.cs | 38 - .../Boolean/Overview/csharp/tostring1.cs | 18 - .../Boolean/Overview/csharp/tostring2.cs | 18 - .../System/Boolean/Overview/fsharp/binary1.fs | 28 - .../Boolean/Overview/fsharp/conversion1.fs | 29 - .../Boolean/Overview/fsharp/conversion3.fs | 25 - .../System/Boolean/Overview/fsharp/format3.fs | 42 - .../Boolean/Overview/fsharp/operations1.fs | 75 -- .../Boolean/Overview/fsharp/operations2.fs | 17 - .../System/Boolean/Overview/fsharp/parse2.fs | 60 - .../System/Boolean/Overview/fsharp/parse3.fs | 21 - .../System/Boolean/Overview/fsharp/size1.fs | 36 - .../Boolean/Overview/fsharp/tostring1.fs | 13 - .../Boolean/Overview/fsharp/tostring2.fs | 13 - .../System/Boolean/Overview/vb/Project.vbproj | 8 - .../System/Boolean/Overview/vb/binary1.vb | 34 - .../System/Boolean/Overview/vb/conversion1.vb | 31 - .../System/Boolean/Overview/vb/conversion3.vb | 51 - .../System/Boolean/Overview/vb/format3.vb | 78 -- .../System/Boolean/Overview/vb/operations1.vb | 89 -- .../System/Boolean/Overview/vb/operations2.vb | 23 - .../System/Boolean/Overview/vb/parse2.vb | 65 - .../System/Boolean/Overview/vb/parse3.vb | 27 - .../System/Boolean/Overview/vb/tostring1.vb | 17 - .../System/Boolean/Overview/vb/tostring2.vb | 19 - .../Byte/Overview/csharp/Project.csproj | 8 - .../System/Byte/Overview/csharp/bitwise1.cs | 24 - .../System/Byte/Overview/csharp/bitwise2.cs | 49 - .../Overview/csharp/byteinstantiation1.cs | 89 -- .../Byte/Overview/csharp/formatting1.cs | 56 - .../System/Byte/Overview/csharp/tobyte1.cs | 287 ----- .../System/Byte/Overview/fsharp/bitwise1.fs | 22 - .../System/Byte/Overview/fsharp/bitwise2.fs | 33 - .../Overview/fsharp/byteinstantiation1.fs | 56 - .../Byte/Overview/fsharp/formatting1.fs | 47 - .../System/Byte/Overview/fsharp/tobyte1.fs | 200 --- .../System/Byte/Overview/vb/Project.vbproj | 8 - .../System/Byte/Overview/vb/bitwise1.vb | 25 - .../System/Byte/Overview/vb/bitwise2.vb | 48 - .../Byte/Overview/vb/byteinstantiate1.vb | 69 - .../System/Byte/Overview/vb/formatting1.vb | 52 - .../Overview/csharp/GetUnicodeCategory3.cs | 72 -- .../Char/Overview/csharp/Project.csproj | 8 - .../Char/Overview/csharp/charstructure.cs | 29 - .../System/Char/Overview/csharp/grapheme1.cs | 18 - .../System/Char/Overview/csharp/normalized.cs | 30 - .../System/Char/Overview/csharp/surrogate1.cs | 28 - .../Char/Overview/csharp/textelements2.cs | 17 - .../Char/Overview/csharp/textelements2a.cs | 19 - .../Overview/fsharp/GetUnicodeCategory3.fs | 68 - .../System/Char/Overview/fsharp/grapheme1.fs | 15 - .../System/Char/Overview/fsharp/normalized.fs | 23 - .../System/Char/Overview/fsharp/surrogate1.fs | 22 - .../Char/Overview/fsharp/textelements2.fs | 16 - .../Char/Overview/fsharp/textelements2a.fs | 18 - .../Char/Overview/vb/GetUnicodeCategory3.vb | 74 -- .../System/Char/Overview/vb/Project.vbproj | 8 - .../System/Char/Overview/vb/grapheme1.vb | 18 - .../System/Char/Overview/vb/normalized.vb | 28 - .../System/Char/Overview/vb/surrogate1.vb | 27 - .../System/Char/Overview/vb/textelements2.vb | 16 - .../System/Char/Overview/vb/textelements2a.vb | 19 - .../Console/Overview/csharp/Project.csproj | 9 - .../Console/Overview/csharp/example3.cs | 195 --- .../Console/Overview/csharp/fontlink1.cs | 74 -- .../Console/Overview/csharp/normalize1.cs | 21 - .../Console/Overview/csharp/setfont1.cs | 83 -- .../System/Console/Overview/csharp/source.cs | 21 - .../Console/Overview/csharp/unicode1.cs | 35 - .../Console/Overview/fsharp/example3.fs | 163 --- .../Console/Overview/fsharp/fontlink1.fs | 54 - .../Console/Overview/fsharp/normalize1.fs | 18 - .../Console/Overview/fsharp/setfont1.fs | 74 -- .../System/Console/Overview/fsharp/source.fs | 21 - .../Console/Overview/fsharp/unicode1.fs | 23 - .../System/Console/Overview/vb/Project.vbproj | 8 - .../System/Console/Overview/vb/example3.vb | 174 --- .../System/Console/Overview/vb/fontlink1.vb | 68 - .../System/Console/Overview/vb/normalize1.vb | 19 - .../System/Console/Overview/vb/setfont1.vb | 75 -- .../System/Console/Overview/vb/source.vb | 17 - .../System/Console/Overview/vb/unicode1.vb | 33 - .../Convert/Overview/csharp/NonDecimal1.cs | 23 - .../Convert/Overview/csharp/Project.csproj | 8 - .../Convert/Overview/csharp/converter.cs | 62 - .../Convert/Overview/fsharp/NonDecimal1.fs | 18 - .../Convert/Overview/fsharp/converter.fs | 48 - .../System/Convert/Overview/vb/NonDecimal1.vb | 23 - .../System/Convert/Overview/vb/Project.vbproj | 8 - .../System/Convert/Overview/vb/converter.vb | 59 - .../System/Convert/Overview/vb/tobyte1.vb | 267 ---- .../System/Convert/Overview/vb/toint32_1.vb | 388 ------ .../System/Convert/Overview/vb/toint64_1.vb | 375 ------ .../Convert/ToInt32/csharp/Project.csproj | 8 - .../Convert/ToInt32/csharp/toint32_1.cs | 392 ------ .../Convert/ToInt64/csharp/Project.csproj | 8 - .../Convert/ToInt64/csharp/toint64_1.cs | 377 ------ .../Convert/ToInt64/fsharp/formatting1.fs | 53 - .../Convert/ToInt64/fsharp/toint64_1.fs | 310 ----- .../DateTime/FromBinary/csharp/Project.csproj | 8 - .../DateTime/FromBinary/csharp/frombinary1.cs | 20 - .../DateTime/FromBinary/fsharp/frombinary1.fs | 15 - .../DateTime/FromBinary/vb/Project.vbproj | 8 - .../DateTime/FromBinary/vb/frombinary1.vb | 22 - .../DateTime/Overview/csharp/Calendar.cs | 117 -- .../Overview/csharp/DateTimeComparisons.cs | 62 - .../DateTime/Overview/csharp/Instantiation.cs | 55 - .../DateTime/Overview/csharp/Parsing.cs | 82 -- .../DateTime/Overview/csharp/Persistence.cs | 345 ----- .../DateTime/Overview/csharp/Project.csproj | 8 - .../DateTime/Overview/csharp/Resolution.cs | 34 - .../DateTime/Overview/csharp/StringFormat.cs | 61 - .../DateTime/Overview/fsharp/Calendar.fs | 108 -- .../Overview/fsharp/DateTimeComparisons.fs | 53 - .../DateTime/Overview/fsharp/Instantiation.fs | 42 - .../DateTime/Overview/fsharp/Parsing.fs | 64 - .../DateTime/Overview/fsharp/Persistence.fs | 284 ----- .../DateTime/Overview/fsharp/Resolution.fs | 19 - .../DateTime/Overview/fsharp/StringFormat.fs | 44 - .../System/DateTime/Overview/vb/Calendar.vb | 110 -- .../Overview/vb/DateTimeComparisons.vb | 58 - .../DateTime/Overview/vb/Instantiation.vb | 61 - .../System/DateTime/Overview/vb/Parsing.vb | 166 --- .../DateTime/Overview/vb/Project.vbproj | 8 - .../System/DateTime/Overview/vb/Resolution.vb | 50 - .../DateTime/Overview/vb/StringFormat.vb | 50 - .../csharp/DecimalDivision_46630_1.cs | 32 - .../Decimal/Overview/csharp/Project.csproj | 8 - .../System/Decimal/Overview/csharp/source.cs | 124 -- .../fsharp/DecimalDivision_46630_1.fs | 22 - .../System/Decimal/Overview/fsharp/source.fs | 73 -- .../Overview/vb/DecimalDivision_46630_1.vb | 47 - .../System/Decimal/Overview/vb/Project.vbproj | 8 - .../System/Decimal/Overview/vb/source.vb | 122 -- .../CreateDelegate/csharp/Project.csproj | 8 - .../CreateDelegate/csharp/openClosedOver.cs | 135 -- .../Delegate/CreateDelegate/csharp/source.cs | 162 --- .../Delegate/CreateDelegate/csharp/source1.cs | 58 - .../CreateDelegate/fsharp/openClosedOver.fs | 101 -- .../Delegate/CreateDelegate/fsharp/source.fs | 126 -- .../Delegate/CreateDelegate/fsharp/source1.fs | 45 - .../Delegate/CreateDelegate/vb/Project.vbproj | 8 - .../CreateDelegate/vb/openClosedOver.vb | 137 -- .../Delegate/CreateDelegate/vb/source.vb | 63 - .../Delegate/CreateDelegate/vb/source1.vb | 164 --- .../Double/CompareTo/csharp/Project.csproj | 8 - .../Double/CompareTo/csharp/compareto2.cs | 18 - .../Double/CompareTo/csharp/compareto3.cs | 18 - .../Double/CompareTo/fsharp/compareto2.fs | 12 - .../Double/CompareTo/fsharp/compareto3.fs | 12 - .../System/Double/CompareTo/vb/Project.vbproj | 8 - .../System/Double/CompareTo/vb/compareto2.vb | 21 - .../System/Double/CompareTo/vb/compareto3.vb | 21 - .../Double/Epsilon/csharp/Equals_25051.cs | 74 -- .../Double/Epsilon/csharp/Project.csproj | 8 - .../System/Double/Epsilon/csharp/epsilon.cs | 25 - .../System/Double/Epsilon/csharp/epsilon1.cs | 55 - .../Double/Epsilon/fsharp/Equals_25051.fs | 59 - .../System/Double/Epsilon/fsharp/epsilon.fs | 17 - .../System/Double/Epsilon/fsharp/epsilon1.fs | 46 - .../System/Double/Epsilon/vb/Equals_25051.vb | 73 -- .../System/Double/Epsilon/vb/Project.vbproj | 8 - .../System/Double/Epsilon/vb/epsilon.vb | 24 - .../System/Double/Epsilon/vb/epsilon1.vb | 57 - .../Double/Equals/csharp/Project.csproj | 8 - .../System/Double/Equals/csharp/equalsabs1.cs | 50 - .../System/Double/Equals/fsharp/equalsabs1.fs | 28 - .../System/Double/Equals/vb/Project.vbproj | 8 - .../System/Double/Equals/vb/equalsabs1.vb | 41 - .../System/Double/Overview/csharp/Program.cs | 17 - .../Double/Overview/csharp/Project.csproj | 9 - .../Double/Overview/csharp/comparison1.cs | 15 - .../Double/Overview/csharp/comparison3.cs | 19 - .../Double/Overview/csharp/comparison4.cs | 41 - .../System/Double/Overview/csharp/convert1.cs | 49 - .../System/Double/Overview/csharp/convert2.cs | 149 --- .../Double/Overview/csharp/exceptional1.cs | 18 - .../Double/Overview/csharp/exceptional2.cs | 27 - .../Double/Overview/csharp/precision1.cs | 28 - .../Double/Overview/csharp/precisionlist1.cs | 16 - .../Double/Overview/csharp/precisionlist3.cs | 26 - .../Double/Overview/csharp/precisionlist4.cs | 35 - .../Double/Overview/csharp/representation1.cs | 21 - .../Double/Overview/csharp/representation2.cs | 15 - .../System/Double/Overview/csharp/source.cs | 391 ------ .../Double/Overview/fsharp/Project.fsproj | 25 - .../Double/Overview/fsharp/comparison1.fs | 12 - .../Double/Overview/fsharp/comparison3.fs | 15 - .../Double/Overview/fsharp/comparison4.fs | 37 - .../System/Double/Overview/fsharp/convert1.fs | 39 - .../System/Double/Overview/fsharp/convert2.fs | 127 -- .../Double/Overview/fsharp/exceptional1.fs | 12 - .../Double/Overview/fsharp/exceptional2.fs | 23 - .../Double/Overview/fsharp/precision1.fs | 24 - .../Double/Overview/fsharp/precisionlist1.fs | 13 - .../Double/Overview/fsharp/precisionlist3.fs | 18 - .../Double/Overview/fsharp/precisionlist4.fs | 30 - .../Double/Overview/fsharp/representation1.fs | 15 - .../Double/Overview/fsharp/representation2.fs | 11 - .../System/Double/Overview/fsharp/source.fs | 230 ---- .../System/Double/Overview/vb/Project.vbproj | 8 - .../System/Double/Overview/vb/comparison1.vb | 16 - .../System/Double/Overview/vb/comparison3.vb | 19 - .../System/Double/Overview/vb/comparison4.vb | 43 - .../System/Double/Overview/vb/convert1.vb | 45 - .../System/Double/Overview/vb/convert2.vb | 140 -- .../System/Double/Overview/vb/exceptional1.vb | 17 - .../System/Double/Overview/vb/exceptional2.vb | 29 - .../System/Double/Overview/vb/precision1.vb | 28 - .../Double/Overview/vb/precisionlist1.vb | 16 - .../Double/Overview/vb/precisionlist3.vb | 27 - .../Double/Overview/vb/precisionlist4.vb | 36 - .../Double/Overview/vb/precisionlist5.vb | 36 - .../Double/Overview/vb/representation1.vb | 21 - .../Double/Overview/vb/representation2.vb | 16 - .../System/Double/Overview/vb/source.vb | 399 ------ .../System/Enum/Overview/csharp/EnumMain.cs | 32 - .../System/Enum/Overview/csharp/Extensions.cs | 41 - .../Enum/Overview/csharp/Project.csproj | 8 - .../System/Enum/Overview/csharp/class1.cs | 18 - .../System/Enum/Overview/csharp/class2.cs | 33 - .../Enum/Overview/csharp/classbitwise1.cs | 63 - .../Enum/Overview/csharp/classconversion1.cs | 27 - .../Enum/Overview/csharp/classconversion2.cs | 15 - .../Enum/Overview/csharp/classformat1.cs | 20 - .../Enum/Overview/csharp/classiterate.cs | 49 - .../Enum/Overview/csharp/classparse1.cs | 39 - .../System/Enum/Overview/fsharp/EnumMain.fs | 42 - .../System/Enum/Overview/fsharp/Extensions.fs | 39 - .../System/Enum/Overview/fsharp/class1.fs | 15 - .../System/Enum/Overview/fsharp/class2.fs | 32 - .../Enum/Overview/fsharp/classbitwise1.fs | 55 - .../Enum/Overview/fsharp/classconversion1.fs | 27 - .../Enum/Overview/fsharp/classconversion2.fs | 17 - .../Enum/Overview/fsharp/classformat1.fs | 22 - .../Enum/Overview/fsharp/classiterate.fs | 43 - .../Enum/Overview/fsharp/classparse1.fs | 40 - .../System/Enum/Overview/vb/EnumMain.vb | 50 - .../System/Enum/Overview/vb/Extensions.vb | 52 - .../System/Enum/Overview/vb/Project.vbproj | 8 - .../System/Enum/Overview/vb/class1.vb | 21 - .../System/Enum/Overview/vb/class2.vb | 38 - .../System/Enum/Overview/vb/classbitwise1.vb | 65 - .../Enum/Overview/vb/classconversion1.vb | 35 - .../Enum/Overview/vb/classconversion2.vb | 23 - .../System/Enum/Overview/vb/classformat1.vb | 27 - .../System/Enum/Overview/vb/classiterate.vb | 56 - .../System/Enum/Overview/vb/classparse1.vb | 42 - .../Exception/HelpLink/csharp/Project.csproj | 8 - .../Exception/HelpLink/csharp/properties.cs | 110 -- .../Exception/HelpLink/fsharp/properties.fs | 79 -- .../Exception/HelpLink/vb/Project.vbproj | 8 - .../Exception/HelpLink/vb/properties.vb | 115 -- .../Exception/Overview/csharp/ToString2.cs | 15 - .../Overview/csharp/basetoderived1.cs | 66 - .../Overview/csharp/catchexception.cs | 30 - .../Exception/Overview/csharp/example.cs | 43 - .../Overview/csharp/iconvertible1.cs | 34 - .../Overview/csharp/notprimeexception.cs | 40 - .../Overview/csharp/primenumbergenerator.cs | 65 - .../Exception/Overview/csharp/project.csproj | 8 - .../Exception/Overview/csharp/rethrow1.cs | 82 -- .../Exception/Overview/csharp/rethrow3.cs | 95 -- .../Exception/Overview/csharp/usageerrors1.cs | 40 - .../Exception/Overview/csharp/usageerrors2.cs | 43 - .../Overview/fsharp/catchexception.fs | 19 - .../Exception/Overview/fsharp/example.fs | 33 - .../Overview/fsharp/notprimeexception.fs | 31 - .../Overview/fsharp/primenumbergenerator.fs | 51 - .../Exception/Overview/fsharp/rethrow1.fs | 58 - .../Exception/Overview/fsharp/rethrow3.fs | 46 - .../Exception/Overview/fsharp/usageerrors1.fs | 25 - .../Exception/Overview/fsharp/usageerrors2.fs | 28 - .../Exception/Overview/vb/Project.vbproj | 8 - .../Exception/Overview/vb/catchexception.vb | 21 - .../System/Exception/Overview/vb/example.vb | 48 - .../Overview/vb/notprimeexception.vb | 38 - .../Overview/vb/primenumbergenerator.vb | 62 - .../System/Exception/Overview/vb/rethrow1.vb | 75 -- .../System/Exception/Overview/vb/rethrow3.vb | 88 -- .../Exception/Overview/vb/usageerrors1.vb | 35 - .../Exception/Overview/vb/usageerrors2.vb | 39 - .../FlagsAttribute/Overview/csharp/Program.cs | 1 - .../Overview/csharp/Project.csproj | 8 - .../FlagsAttribute/Overview/csharp/flags.cs | 80 -- .../FlagsAttribute/Overview/csharp/flags1.cs | 70 - .../FlagsAttribute/Overview/fsharp/flags.fs | 71 -- .../FlagsAttribute/Overview/fsharp/flags1.fs | 68 - .../FlagsAttribute/Overview/vb/Project.vbproj | 8 - .../FlagsAttribute/Overview/vb/flags.vb | 77 -- .../FlagsAttribute/Overview/vb/flags1.vb | 82 -- .../Overview/csharp/FormatExample2.cs | 77 -- .../Overview/csharp/Project.csproj | 8 - .../Overview/csharp/formatoverload1.cs | 18 - .../Overview/csharp/formatoverload2.cs | 38 - .../Overview/csharp/formatsyntax1.cs | 12 - .../Overview/csharp/interceptor2.cs | 119 -- .../Overview/csharp/qa-interpolated1.cs | 23 - .../Overview/csharp/qa-interpolated2.cs | 20 - .../FormatException/Overview/csharp/qa11.cs | 22 - .../FormatException/Overview/csharp/qa21.cs | 24 - .../FormatException/Overview/csharp/qa26.cs | 24 - .../FormatException/Overview/csharp/qa27.cs | 16 - .../FormatException/Overview/csharp/qa28.cs | 16 - .../FormatException/Overview/csharp/qa29.cs | 15 - .../FormatException/Overview/csharp/qa3.cs | 56 - .../Overview/csharp/starting1.cs | 57 - .../Overview/csharp/starting2.cs | 28 - .../Overview/csharp/starting3.cs | 26 - .../Overview/fsharp/FormatExample2.fs | 66 - .../Overview/fsharp/formatoverload1.fs | 13 - .../Overview/fsharp/formatoverload2.fs | 29 - .../Overview/fsharp/formatsyntax1.fs | 8 - .../Overview/fsharp/interceptor2.fs | 109 -- .../Overview/fsharp/qa-interpolated1.fs | 18 - .../Overview/fsharp/qa-interpolated2.fs | 15 - .../FormatException/Overview/fsharp/qa11.fs | 15 - .../FormatException/Overview/fsharp/qa21.fs | 17 - .../FormatException/Overview/fsharp/qa26.fs | 16 - .../FormatException/Overview/fsharp/qa27.fs | 11 - .../FormatException/Overview/fsharp/qa28.fs | 11 - .../FormatException/Overview/fsharp/qa29.fs | 11 - .../FormatException/Overview/fsharp/qa3.fs | 36 - .../Overview/fsharp/starting1.fs | 44 - .../Overview/fsharp/starting2.fs | 20 - .../Overview/fsharp/starting3.fs | 22 - .../Overview/csharp/Project.csproj | 8 - .../IDisposable/Overview/csharp/base1.cs | 36 - .../IDisposable/Overview/csharp/base2.cs | 38 - .../IDisposable/Overview/csharp/calling1.cs | 44 - .../IDisposable/Overview/csharp/calling2.cs | 50 - .../IDisposable/Overview/csharp/derived1.cs | 64 - .../IDisposable/Overview/fsharp/base1.fs | 29 - .../IDisposable/Overview/fsharp/base2.fs | 29 - .../IDisposable/Overview/fsharp/calling1.fs | 24 - .../IDisposable/Overview/fsharp/calling2.fs | 27 - .../IDisposable/Overview/fsharp/derived1.fs | 48 - .../IDisposable/Overview/vb/Project.vbproj | 8 - .../System/IDisposable/Overview/vb/base1.vb | 34 - .../System/IDisposable/Overview/vb/base2.vb | 34 - .../IDisposable/Overview/vb/calling1.vb | 52 - .../IDisposable/Overview/vb/calling2.vb | 56 - .../IDisposable/Overview/vb/derived1.vb | 59 - .../Int32/Overview/csharp/Formatting1.cs | 57 - .../Int32/Overview/csharp/Instantiate1.cs | 105 -- .../Int32/Overview/csharp/Project.csproj | 8 - .../Int32/Overview/fsharp/Formatting1.fs | 43 - .../Int32/Overview/fsharp/Instantiate1.fs | 84 -- .../System/Int32/Overview/fsharp/toint32_1.fs | 25 - .../System/Int32/Overview/vb/Formatting1.vb | 53 - .../System/Int32/Overview/vb/Instantiate1.vb | 94 -- .../System/Int32/Overview/vb/Project.vbproj | 8 - .../Int64/Overview/csharp/Project.csproj | 8 - .../Int64/Overview/csharp/formatting1.cs | 65 - .../Int64/Overview/csharp/instantiate1.cs | 107 -- .../Int64/Overview/fsharp/instantiate1.fs | 89 -- .../System/Int64/Overview/vb/Project.vbproj | 8 - .../System/Int64/Overview/vb/formatting1.vb | 62 - .../System/Int64/Overview/vb/instantiate1.vb | 96 -- .../Overview/csharp/Interface1.cs | 20 - .../Overview/csharp/ToString1.cs | 11 - .../Overview/csharp/ToString2.cs | 15 - .../Overview/csharp/basetoderived1.cs | 66 - .../Overview/csharp/iconvertible1.cs | 34 - .../Overview/csharp/project.csproj | 8 - .../Overview/fsharp/Interface1.fs | 17 - .../Overview/fsharp/ToString1.fs | 7 - .../Overview/fsharp/ToString2.fs | 9 - .../Overview/fsharp/basetoderived1.fs | 35 - .../Overview/fsharp/iconvertible1.fs | 23 - .../Overview/vb/Interface1.vb | 20 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/basetoderived1.vb | 67 - .../Overview/vb/iconvertible1.vb | 27 - .../Overview/csharp/Other/Enumerable1.cs | 19 - .../Overview/csharp/Other/Enumerable2.cs | 21 - .../Overview/csharp/Other/Enumerable3.cs | 21 - .../Overview/csharp/Other/Enumerable4.cs | 21 - .../Overview/csharp/Other/Enumerable5.cs | 22 - .../Overview/csharp/Other/Enumerable6.cs | 25 - .../Overview/csharp/Other/Iterating1.cs | 30 - .../Overview/csharp/Other/Iterating2.cs | 44 - .../Overview/csharp/Other/Iterating3.cs | 31 - .../Overview/csharp/Other/List_Sort1.cs | 42 - .../Overview/csharp/Other/List_Sort2.cs | 39 - .../Overview/csharp/Other/List_Sort3.cs | 42 - .../Overview/csharp/Other/List_Sort4.cs | 39 - .../Overview/csharp/Other/Nullable1.cs | 25 - .../Overview/csharp/Other/Nullable2.cs | 27 - .../Overview/csharp/Other/project.csproj | 8 - .../Overview/csharp/WPF1/App1.xaml | 9 - .../Overview/csharp/WPF1/App1.xaml.cs | 17 - .../Overview/csharp/WPF1/MainWindow.xaml | 14 - .../Overview/csharp/WPF1/MainWindow.xaml.cs | 44 - .../csharp/WPF1/WPFCrossThreadCS.csproj | 9 - .../Overview/csharp/WPF1/app.config | 3 - .../Overview/csharp/WPF2/App2.xaml | 9 - .../Overview/csharp/WPF2/App2.xaml.cs | 17 - .../Overview/csharp/WPF2/MainWindow1.xaml | 14 - .../csharp/WPF2/MainWindowDispatcher.xaml.cs | 49 - .../WPF2/WPFCrossThreadDispatcherCS.csproj | 9 - .../csharp/WinForms/Form1.Designer.cs | 73 -- .../Overview/csharp/WinForms/Form1.cs | 48 - .../Overview/csharp/WinForms/Form1.resx | 120 -- .../csharp/WinForms/Form11.Designer.cs | 73 -- .../Overview/csharp/WinForms/Form11.cs | 61 - .../Overview/csharp/WinForms/Form11.resx | 120 -- .../Overview/csharp/WinForms/Program.cs | 22 - .../Overview/csharp/WinForms/Program1.cs | 22 - .../csharp/WinForms/WFCrossThreadCS.csproj | 10 - .../Overview/fsharp/Enumerable1.fs | 15 - .../Overview/fsharp/Enumerable2.fs | 19 - .../Overview/fsharp/Enumerable3.fs | 18 - .../Overview/fsharp/Enumerable4.fs | 18 - .../Overview/fsharp/Enumerable5.fs | 19 - .../Overview/fsharp/Enumerable6.fs | 22 - .../Overview/fsharp/Iterating1.fs | 23 - .../Overview/fsharp/Iterating2.fs | 37 - .../Overview/fsharp/Iterating3.fs | 25 - .../Overview/fsharp/List_Sort1.fs | 27 - .../Overview/fsharp/List_Sort2.fs | 24 - .../Overview/fsharp/List_Sort3.fs | 26 - .../Overview/fsharp/List_Sort4.fs | 25 - .../Overview/fsharp/Nullable1.fs | 21 - .../Overview/fsharp/Nullable2.fs | 23 - .../Overview/vb/Other/Enumerable1.vb | 19 - .../Overview/vb/Other/Enumerable2.vb | 23 - .../Overview/vb/Other/Enumerable3.vb | 22 - .../Overview/vb/Other/Enumerable4.vb | 23 - .../Overview/vb/Other/Enumerable5.vb | 23 - .../Overview/vb/Other/Enumerable6.vb | 27 - .../Overview/vb/Other/Iterating1.vb | 30 - .../Overview/vb/Other/Iterating2.vb | 44 - .../Overview/vb/Other/Iterating3.vb | 31 - .../Overview/vb/Other/List_Sort1.vb | 43 - .../Overview/vb/Other/List_Sort2.vb | 38 - .../Overview/vb/Other/List_Sort3.vb | 41 - .../Overview/vb/Other/List_Sort4.vb | 37 - .../Overview/vb/Other/Nullable1.vb | 26 - .../Overview/vb/Other/Nullable2.vb | 32 - .../Overview/vb/Other/Project.vbproj | 8 - .../Overview/vb/WinForms/ApplicationEvents.vb | 29 - .../Overview/vb/WinForms/Form1.Designer.vb | 61 - .../Overview/vb/WinForms/Form1.resx | 120 -- .../Overview/vb/WinForms/Form1.vb | 32 - .../Overview/vb/WinForms/Form11.Designer.vb | 60 - .../Overview/vb/WinForms/Form11.resx | 120 -- .../Overview/vb/WinForms/Form11.vb | 42 - .../My Project/Application.Designer.vb | 37 - .../vb/WinForms/My Project/Application.myapp | 10 - .../Overview/vb/WinForms/WinFormsApp1.vbproj | 32 - .../Overview/csharp/BadState1.cs | 38 - .../Overview/csharp/TestProp1.cs | 59 - .../Overview/csharp/TestProp2.cs | 53 - .../Overview/csharp/project.csproj | 8 - .../Overview/fsharp/BadState1.fs | 34 - .../Overview/fsharp/TestProp1.fs | 55 - .../Overview/fsharp/TestProp2.fs | 48 - .../Overview/vb/BadState1.vb | 37 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/TestProp1.vb | 70 - .../Overview/vb/TestProp2.vb | 61 - .../Object/Equals/csharp/Project.csproj | 8 - .../System/Object/Equals/csharp/equals2.cs | 91 -- .../System/Object/Equals/csharp/equals3.cs | 77 -- .../System/Object/Equals/csharp/equals4.cs | 60 - .../System/Object/Equals/csharp/equals_ref.cs | 44 - .../Object/Equals/csharp/equals_val1.cs | 20 - .../Object/Equals/csharp/equals_val2.cs | 40 - .../Object/Equals/csharp/equalsoverride.cs | 43 - .../System/Object/Equals/csharp/equalssb1.cs | 26 - .../Object/Equals/fsharp/Project.fsproj | 19 - .../System/Object/Equals/fsharp/equals2.fs | 54 - .../System/Object/Equals/fsharp/equals3.fs | 51 - .../System/Object/Equals/fsharp/equals4.fs | 48 - .../System/Object/Equals/fsharp/equals_ref.fs | 27 - .../Object/Equals/fsharp/equals_val1.fs | 14 - .../Object/Equals/fsharp/equals_val2.fs | 24 - .../Object/Equals/fsharp/equalsoverride.fs | 27 - .../System/Object/Equals/fsharp/equalssb1.fs | 23 - .../System/Object/Equals/vb/Project.vbproj | 8 - .../System/Object/Equals/vb/equals2.vb | 82 -- .../System/Object/Equals/vb/equals3.vb | 69 - .../System/Object/Equals/vb/equals4.vb | 50 - .../System/Object/Equals/vb/equals_ref.vb | 43 - .../System/Object/Equals/vb/equals_val1.vb | 21 - .../System/Object/Equals/vb/equals_val2.vb | 37 - .../System/Object/Equals/vb/equalsoverride.vb | 39 - .../System/Object/Equals/vb/equalssb1.vb | 29 - .../Object/Finalize/csharp/Project.csproj | 8 - .../Object/Finalize/csharp/finalize_safe.cs | 152 --- .../Object/Finalize/fsharp/finalize_safe.fs | 123 -- .../System/Object/Finalize/vb/Project.vbproj | 8 - .../Object/Finalize/vb/finalize_safe.vb | 167 --- .../Object/GetHashCode/csharp/Project.csproj | 8 - .../Object/GetHashCode/csharp/direct1.cs | 60 - .../Object/GetHashCode/csharp/shift1.cs | 72 -- .../System/Object/GetHashCode/csharp/xor1.cs | 44 - .../System/Object/GetHashCode/csharp/xor2.cs | 49 - .../Object/GetHashCode/fsharp/Project.fsproj | 15 - .../Object/GetHashCode/fsharp/direct1.fs | 38 - .../Object/GetHashCode/fsharp/shift1.fs | 50 - .../System/Object/GetHashCode/fsharp/xor1.fs | 28 - .../System/Object/GetHashCode/fsharp/xor2.fs | 28 - .../Object/GetHashCode/vb/Project.vbproj | 8 - .../System/Object/GetHashCode/vb/direct1.vb | 56 - .../System/Object/GetHashCode/vb/shift1.vb | 64 - .../System/Object/GetHashCode/vb/xor1.vb | 34 - .../System/Object/GetHashCode/vb/xor2.vb | 36 - .../Object/ToString/csharp/Project.csproj | 8 - .../System/Object/ToString/csharp/array1.cs | 20 - .../Object/ToString/csharp/customize1.cs | 38 - .../Object/ToString/csharp/customize2.cs | 47 - .../Object/ToString/csharp/tostring1.cs | 15 - .../Object/ToString/csharp/tostring2.cs | 22 - .../Object/ToString/csharp/tostring3.cs | 29 - .../ToString/csharp/tostringoverload1.cs | 75 -- .../ToString/csharp/tostringoverload2.cs | 24 - .../System/Object/ToString/fsharp/array1.fs | 13 - .../Object/ToString/fsharp/customize1.fs | 25 - .../Object/ToString/fsharp/customize2.fs | 32 - .../Object/ToString/fsharp/tostring1.fs | 10 - .../Object/ToString/fsharp/tostring2.fs | 10 - .../Object/ToString/fsharp/tostring3.fs | 13 - .../ToString/fsharp/tostringoverload1.fs | 38 - .../ToString/fsharp/tostringoverload2.fs | 18 - .../System/Object/ToString/vb/Project.vbproj | 8 - .../System/Object/ToString/vb/array1.vb | 19 - .../System/Object/ToString/vb/customize1.vb | 43 - .../System/Object/ToString/vb/customize2.vb | 49 - .../System/Object/ToString/vb/tostring1.vb | 14 - .../System/Object/ToString/vb/tostring2.vb | 16 - .../System/Object/ToString/vb/tostring3.vb | 25 - .../Object/ToString/vb/tostringoverload1.vb | 80 -- .../Object/ToString/vb/tostringoverload2.vb | 26 - .../Random/Overview/csharp/Project.csproj | 8 - .../System/Random/Overview/csharp/Random1.cs | 60 - .../System/Random/Overview/csharp/array1.cs | 21 - .../Random/Overview/csharp/booleans1.cs | 47 - .../Random/Overview/csharp/booleans2.cs | 38 - .../System/Random/Overview/csharp/bytes1.cs | 62 - .../Random/Overview/csharp/doublerange1.cs | 43 - .../Random/Overview/csharp/doublerange2.cs | 25 - .../Random/Overview/csharp/doublerange3.cs | 39 - .../System/Random/Overview/csharp/long1.cs | 43 - .../Random/Overview/csharp/nextbytes1.cs | 22 - .../Random/Overview/csharp/nextdoubleex1.cs | 22 - .../System/Random/Overview/csharp/nextex1.cs | 18 - .../System/Random/Overview/csharp/range1.cs | 21 - .../System/Random/Overview/csharp/range2.cs | 23 - .../System/Random/Overview/csharp/same1.cs | 89 -- .../Random/Overview/csharp/threadsafeex1.cs | 167 --- .../Random/Overview/csharp/threadsafeex2.cs | 166 --- .../System/Random/Overview/csharp/unique.cs | 49 - .../Random/Overview/csharp/uniquearray1.cs | 122 -- .../System/Random/Overview/fsharp/Random1.fs | 50 - .../System/Random/Overview/fsharp/array1.fs | 21 - .../Random/Overview/fsharp/booleans1.fs | 28 - .../Random/Overview/fsharp/booleans2.fs | 26 - .../System/Random/Overview/fsharp/bytes1.fs | 49 - .../Random/Overview/fsharp/doublerange1.fs | 37 - .../Random/Overview/fsharp/doublerange2.fs | 22 - .../Random/Overview/fsharp/doublerange3.fs | 31 - .../System/Random/Overview/fsharp/long1.fs | 37 - .../Random/Overview/fsharp/nextbytes1.fs | 17 - .../Random/Overview/fsharp/nextdoubleex1.fs | 16 - .../System/Random/Overview/fsharp/nextex1.fs | 12 - .../System/Random/Overview/fsharp/range1.fs | 14 - .../System/Random/Overview/fsharp/range2.fs | 17 - .../System/Random/Overview/fsharp/same1.fs | 76 -- .../Random/Overview/fsharp/threadsafeex1.fs | 146 --- .../Random/Overview/fsharp/threadsafeex2.fs | 143 --- .../System/Random/Overview/fsharp/unique.fs | 46 - .../Random/Overview/fsharp/uniquearray1.fs | 78 -- .../System/Random/Overview/vb/Project.vbproj | 8 - .../System/Random/Overview/vb/Random1.vb | 55 - .../System/Random/Overview/vb/array1.vb | 20 - .../System/Random/Overview/vb/booleans1.vb | 43 - .../System/Random/Overview/vb/booleans2.vb | 34 - .../System/Random/Overview/vb/bytes1.vb | 64 - .../System/Random/Overview/vb/doublerange1.vb | 42 - .../System/Random/Overview/vb/doublerange2.vb | 24 - .../System/Random/Overview/vb/doublerange3.vb | 36 - .../System/Random/Overview/vb/long1.vb | 42 - .../System/Random/Overview/vb/nextbytes1.vb | 19 - .../Random/Overview/vb/nextdoubleex1.vb | 19 - .../System/Random/Overview/vb/nextex1.vb | 15 - .../System/Random/Overview/vb/range1.vb | 18 - .../System/Random/Overview/vb/range2.vb | 20 - .../System/Random/Overview/vb/same1.vb | 88 -- .../Random/Overview/vb/threadsafeex1.vb | 144 --- .../Random/Overview/vb/threadsafeex2.vb | 143 --- .../System/Random/Overview/vb/unique.vb | 54 - .../System/Random/Overview/vb/uniquearray1.vb | 125 -- .../Single/CompareTo/csharp/Project.csproj | 8 - .../Single/CompareTo/csharp/compareto2.cs | 20 - .../Single/CompareTo/csharp/compareto3.cs | 20 - .../Single/CompareTo/fsharp/compareto2.fs | 13 - .../Single/CompareTo/fsharp/compareto3.fs | 13 - .../System/Single/CompareTo/vb/Project.vbproj | 8 - .../System/Single/CompareTo/vb/compareto2.vb | 21 - .../System/Single/CompareTo/vb/compareto3.vb | 21 - .../Single/Epsilon/csharp/Project.csproj | 8 - .../Epsilon/csharp/SingleEquals_25051.cs | 74 -- .../System/Single/Epsilon/csharp/epsilon.cs | 25 - .../System/Single/Epsilon/csharp/epsilon1.cs | 50 - .../Epsilon/fsharp/SingleEquals_25051.fs | 62 - .../System/Single/Epsilon/fsharp/epsilon.fs | 17 - .../System/Single/Epsilon/fsharp/epsilon1.fs | 44 - .../System/Single/Epsilon/vb/Project.vbproj | 8 - .../Single/Epsilon/vb/SingleEquals_25051.vb | 71 -- .../System/Single/Epsilon/vb/epsilon.vb | 24 - .../System/Single/Epsilon/vb/epsilon1.vb | 54 - .../Single/Equals/csharp/Project.csproj | 8 - .../System/Single/Equals/csharp/equalsabs1.cs | 43 - .../System/Single/Equals/fsharp/equalsabs1.fs | 27 - .../System/Single/Equals/vb/Project.vbproj | 8 - .../System/Single/Equals/vb/equalsabs1.vb | 44 - .../System/Single/Overview/csharp/Program.cs | 1 - .../Single/Overview/csharp/Project.csproj | 8 - .../Single/Overview/csharp/comparison1.cs | 15 - .../Single/Overview/csharp/comparison2.cs | 20 - .../Single/Overview/csharp/comparison3.cs | 19 - .../Single/Overview/csharp/comparison4.cs | 51 - .../System/Single/Overview/csharp/convert1.cs | 48 - .../System/Single/Overview/csharp/convert2.cs | 98 -- .../Single/Overview/csharp/exceptional1.cs | 19 - .../Single/Overview/csharp/exceptional2.cs | 28 - .../Single/Overview/csharp/precisionlist1.cs | 17 - .../Single/Overview/csharp/precisionlist3.cs | 25 - .../Single/Overview/csharp/precisionlist4a.cs | 35 - .../Single/Overview/csharp/representation1.cs | 21 - .../Single/Overview/csharp/representation2.cs | 16 - .../Single/Overview/fsharp/Project.fsproj | 22 - .../Single/Overview/fsharp/comparison1.fs | 9 - .../Single/Overview/fsharp/comparison2.fs | 17 - .../Single/Overview/fsharp/comparison3.fs | 14 - .../Single/Overview/fsharp/comparison4.fs | 35 - .../System/Single/Overview/fsharp/convert1.fs | 51 - .../System/Single/Overview/fsharp/convert2.fs | 79 -- .../Single/Overview/fsharp/exceptional1.fs | 13 - .../Single/Overview/fsharp/exceptional2.fs | 23 - .../Single/Overview/fsharp/precisionlist1.fs | 11 - .../Single/Overview/fsharp/precisionlist3.fs | 19 - .../Single/Overview/fsharp/precisionlist4a.fs | 28 - .../Single/Overview/fsharp/representation1.fs | 16 - .../Single/Overview/fsharp/representation2.fs | 11 - .../Single/Overview/vb/PrecisionList4a.vb | 37 - .../Single/Overview/vb/PrecisionList5a.vb | 36 - .../System/Single/Overview/vb/Project.vbproj | 8 - .../System/Single/Overview/vb/comparison1.vb | 15 - .../System/Single/Overview/vb/comparison2.vb | 20 - .../System/Single/Overview/vb/comparison3.vb | 18 - .../System/Single/Overview/vb/comparison4.vb | 43 - .../System/Single/Overview/vb/convert1.vb | 49 - .../System/Single/Overview/vb/convert2.vb | 92 -- .../System/Single/Overview/vb/exceptional1.vb | 17 - .../System/Single/Overview/vb/exceptional2.vb | 29 - .../Single/Overview/vb/precisionlist1.vb | 13 - .../Single/Overview/vb/precisionlist3.vb | 25 - .../Single/Overview/vb/representation1.vb | 22 - .../Single/Overview/vb/representation2.vb | 15 - .../System/Span/Overview/csharp/Program2.cs | 20 - .../Span/Overview/csharp/Project.csproj | 9 - .../System/Span/Overview/csharp/program.cs | 138 -- .../System/Span/Overview/fsharp/program.fs | 121 -- .../System/Span/Slice/csharp/Program.cs | 14 - .../System/Span/Slice/csharp/Program2.cs | 19 - .../System/Span/Slice/csharp/slice.csproj | 8 - .../System/Span/Slice/fsharp/Program.fs | 18 - .../System/Span/Slice/fsharp/Program2.fs | 13 - .../System/Span/Slice/fsharp/fs.fsproj | 11 - .../System/String/.ctor/cpp/sbyte_ctor1.cpp | 20 - .../System/String/.ctor/csharp/Project.csproj | 9 - .../System/String/.ctor/csharp/char2_ctor.cs | 30 - .../String/.ctor/csharp/chptrctor_null.cs | 31 - .../System/String/.ctor/csharp/ctor1.cs | 17 - .../System/String/.ctor/csharp/ctor2.cs | 20 - .../String/.ctor/csharp/ptrctor_null.cs | 32 - .../System/String/.ctor/csharp/source.cs | 91 -- .../System/String/.ctor/fsharp/char2_ctor.fs | 29 - .../String/.ctor/fsharp/chptrctor_null.fs | 26 - .../System/String/.ctor/fsharp/ctor1.fs | 11 - .../System/String/.ctor/fsharp/ctor2.fs | 18 - .../String/.ctor/fsharp/ptrctor_null.fs | 28 - .../System/String/.ctor/fsharp/source.fs | 70 - .../System/String/.ctor/vb/Project.vbproj | 8 - .../snippets/System/String/.ctor/vb/ctor1.vb | 16 - .../snippets/System/String/.ctor/vb/source.vb | 47 - .../System/String/Format/csharp/Example1.cs | 25 - .../String/Format/csharp/Project.csproj | 8 - .../System/String/Format/fsharp/Example1.fs | 19 - .../System/String/Format/vb/Example1.vb | 24 - .../System/String/Format/vb/FormatExample2.vb | 69 - .../System/String/Format/vb/Project.vbproj | 8 - .../String/Format/vb/formatoverload1.vb | 18 - .../String/Format/vb/formatoverload2.vb | 35 - .../System/String/Format/vb/formatsyntax1.vb | 12 - .../System/String/Format/vb/interceptor2.vb | 120 -- .../String/Format/vb/qa-interpolated1.vb | 20 - .../String/Format/vb/qa-interpolated2.vb | 17 - .../snippets/System/String/Format/vb/qa1.vb | 21 - .../snippets/System/String/Format/vb/qa2.vb | 25 - .../snippets/System/String/Format/vb/qa26.vb | 23 - .../snippets/System/String/Format/vb/qa27.vb | 16 - .../snippets/System/String/Format/vb/qa28.vb | 16 - .../snippets/System/String/Format/vb/qa29.vb | 14 - .../snippets/System/String/Format/vb/qa3.vb | 58 - .../System/String/Format/vb/starting1.vb | 80 -- .../System/String/Format/vb/starting2.vb | 27 - .../System/String/Intern/csharp/Intern1.cs | 17 - .../String/Intern/csharp/Project.csproj | 8 - .../System/String/Intern/fsharp/Intern1.fs | 11 - .../System/String/Intern/fsharp/fs.fsproj | 10 - .../System/String/Intern/vb/Intern1.vb | 18 - .../System/String/Intern/vb/Project.vbproj | 8 - .../IsNullOrEmpty/csharp/NullString1.cs | 40 - .../IsNullOrEmpty/csharp/Project.csproj | 8 - .../IsNullOrEmpty/csharp/isnullorempty1.cs | 25 - .../IsNullOrEmpty/fsharp/NullString1.fs | 19 - .../IsNullOrEmpty/fsharp/NullString2.fs | 12 - .../IsNullOrEmpty/fsharp/isnullorempty1.fs | 19 - .../String/IsNullOrEmpty/vb/NullString1.vb | 34 - .../String/IsNullOrEmpty/vb/Project.vbproj | 8 - .../String/IsNullOrEmpty/vb/isnullorempty1.vb | 20 - .../String/Overview/csharp/Project.csproj | 9 - .../System/String/Overview/csharp/case1.cs | 55 - .../System/String/Overview/csharp/case2.cs | 42 - .../String/Overview/csharp/compare11.cs | 18 - .../System/String/Overview/csharp/compare2.cs | 62 - .../System/String/Overview/csharp/compare3.cs | 39 - .../System/String/Overview/csharp/compare4.cs | 44 - .../String/Overview/csharp/equality1.cs | 42 - .../System/String/Overview/csharp/format1.cs | 24 - .../String/Overview/csharp/grapheme1.cs | 36 - .../String/Overview/csharp/immutable.cs | 25 - .../String/Overview/csharp/immutable1.cs | 24 - .../System/String/Overview/csharp/index11.cs | 27 - .../System/String/Overview/csharp/index2.cs | 27 - .../System/String/Overview/csharp/index3.cs | 76 -- .../String/Overview/csharp/normalize1.cs | 93 -- .../String/Overview/csharp/nullorempty1.cs | 80 -- .../System/String/Overview/csharp/parse1.cs | 30 - .../System/String/Overview/csharp/program.cs | 114 -- .../System/String/Overview/csharp/search1.cs | 28 - .../System/String/Overview/csharp/sort1.cs | 58 - .../String/Overview/csharp/surrogate1.cs | 19 - .../System/String/Overview/fsharp/case1.fs | 47 - .../System/String/Overview/fsharp/case2.fs | 37 - .../String/Overview/fsharp/compare11.fs | 13 - .../System/String/Overview/fsharp/compare2.fs | 45 - .../System/String/Overview/fsharp/compare3.fs | 33 - .../System/String/Overview/fsharp/compare4.fs | 39 - .../String/Overview/fsharp/equality1.fs | 36 - .../System/String/Overview/fsharp/format1.fs | 18 - .../String/Overview/fsharp/grapheme1.fs | 30 - .../String/Overview/fsharp/immutable.fs | 17 - .../String/Overview/fsharp/immutable1.fs | 17 - .../System/String/Overview/fsharp/index11.fs | 16 - .../System/String/Overview/fsharp/index2.fs | 16 - .../System/String/Overview/fsharp/index3.fs | 59 - .../String/Overview/fsharp/normalize1.fs | 77 -- .../String/Overview/fsharp/nullorempty1.fs | 57 - .../System/String/Overview/fsharp/parse1.fs | 21 - .../System/String/Overview/fsharp/program.fs | 92 -- .../System/String/Overview/fsharp/search1.fs | 20 - .../System/String/Overview/fsharp/sort1.fs | 51 - .../String/Overview/fsharp/surrogate1.fs | 13 - .../System/String/Overview/vb/Project.vbproj | 8 - .../System/String/Overview/vb/case1.vb | 57 - .../System/String/Overview/vb/case2.vb | 41 - .../System/String/Overview/vb/compare1.vb | 18 - .../System/String/Overview/vb/compare2.vb | 66 - .../System/String/Overview/vb/compare3.vb | 42 - .../System/String/Overview/vb/compare4.vb | 53 - .../System/String/Overview/vb/equality1.vb | 45 - .../System/String/Overview/vb/format1.vb | 26 - .../System/String/Overview/vb/grapheme1.vb | 36 - .../System/String/Overview/vb/immutable.vb | 26 - .../System/String/Overview/vb/immutable1.vb | 24 - .../System/String/Overview/vb/index1.vb | 23 - .../System/String/Overview/vb/index2.vb | 23 - .../System/String/Overview/vb/index3.vb | 76 -- .../System/String/Overview/vb/instantiate1.vb | 84 -- .../System/String/Overview/vb/normalize1.vb | 96 -- .../System/String/Overview/vb/nullorempty1.vb | 74 -- .../System/String/Overview/vb/parse1.vb | 33 - .../System/String/Overview/vb/search1.vb | 30 - .../System/String/Overview/vb/sort1.vb | 57 - .../System/String/Overview/vb/surrogate1.vb | 20 - .../TimeSpan/Overview/csharp/Project.csproj | 8 - .../TimeSpan/Overview/csharp/instantiate1.cs | 74 -- .../TimeSpan/Overview/csharp/legacycode1.cs | 54 - .../TimeSpan/Overview/csharp/perappdomain1.cs | 15 - .../TimeSpan/Overview/csharp/showtimespan.cs | 16 - .../System/TimeSpan/Overview/csharp/zero1.cs | 31 - .../TimeSpan/Overview/fsharp/instantiate1.fs | 59 - .../TimeSpan/Overview/fsharp/legacycode1.fs | 37 - .../TimeSpan/Overview/fsharp/perappdomain1.fs | 10 - .../TimeSpan/Overview/fsharp/showtimespan.fs | 10 - .../System/TimeSpan/Overview/fsharp/zero1.fs | 25 - .../TimeSpan/Overview/vb/Project.vbproj | 8 - .../TimeSpan/Overview/vb/instantiate1.vb | 66 - .../TimeSpan/Overview/vb/legacycode1.vb | 47 - .../TimeSpan/Overview/vb/perappdomain1.vb | 13 - .../TimeSpan/Overview/vb/showtimespan.vb | 15 - .../System/TimeSpan/Overview/vb/zero1.vb | 27 - .../TimeSpan/Parse/csharp/Project.csproj | 8 - .../TimeSpan/Parse/csharp/parsefailure1.cs | 31 - .../TimeSpan/Parse/fsharp/parsefailure1.fs | 23 - .../System/TimeSpan/Parse/vb/Project.vbproj | 8 - .../System/TimeSpan/Parse/vb/parsefailure1.vb | 27 - .../TimeSpan/TryParse/csharp/Project.csproj | 8 - .../TryParse/csharp/tryparsefailure1.cs | 21 - .../TryParse/fsharp/tryparsefailure1.fs | 17 - .../TimeSpan/TryParse/vb/Project.vbproj | 8 - .../TimeSpan/TryParse/vb/tryparsefailure1.vb | 21 - .../System/Type/GetType/csharp/Project.csproj | 8 - .../System/Type/GetType/csharp/source.cs | 32 - .../System/Type/GetType/fsharp/source.fs | 37 - .../MakeGenericType/csharp/Project.csproj | 8 - .../Type/MakeGenericType/csharp/remarks.cs | 22 - .../Type/MakeGenericType/fsharp/remarks.fs | 5 - .../Type/MakeGenericType/vb/Project.vbproj | 8 - .../System/Type/MakeGenericType/vb/remarks.vb | 23 - .../System/Type/Overview/csharp/Equals1.cs | 27 - .../System/Type/Overview/csharp/GetType1.cs | 20 - .../Type/Overview/csharp/Project.csproj | 8 - .../System/Type/Overview/fsharp/Equals1.fs | 23 - .../System/Type/Overview/fsharp/GetType1.fs | 13 - .../System/Type/Overview/vb/Equals1.vb | 28 - .../System/Type/Overview/vb/GetType1.vb | 20 - .../System/Type/Overview/vb/Project.vbproj | 8 - .../Overview/csharp/Missing1.cs | 47 - .../Overview/csharp/Missing1a.cs | 24 - .../Overview/csharp/Regex1.cs | 29 - .../Overview/csharp/ctorException1.cs | 33 - .../Overview/csharp/project.csproj | 8 - .../Overview/fsharp/Missing1.fs | 27 - .../Overview/fsharp/Missing1a.fs | 15 - .../Overview/fsharp/Regex1.fs | 23 - .../Overview/vb/CtorException1.vb | 31 - .../Overview/vb/GettingVersions1.vb | 64 - .../Overview/vb/Missing1.vb | 43 - .../Overview/vb/Missing1a.vb | 23 - .../Overview/vb/Project.vbproj | 8 - .../Overview/vb/Regex1.vb | 30 - .../Overview/csharp/GettingVersions1.cs | 71 -- .../Version/Overview/csharp/Project.csproj | 12 - .../Version/Overview/csharp/clickonce.cs | 13 - .../Version/Overview/csharp/comparisons1.cs | 33 - .../Version/Overview/csharp/comparisons2.cs | 26 - .../Version/Overview/csharp/currentapp.cs | 16 - .../Version/Overview/csharp/currentassem.cs | 16 - .../Version/Overview/csharp/specificassem.cs | 17 - .../Overview/fsharp/GettingVersions1.fs | 22 - .../Version/Overview/fsharp/comparisons1.fs | 19 - .../Version/Overview/fsharp/comparisons2.fs | 24 - .../Version/Overview/fsharp/currentapp.fs | 11 - .../Version/Overview/fsharp/currentassem.fs | 11 - .../Version/Overview/fsharp/specificassem.fs | 12 - .../System/Version/Overview/vb/Project.vbproj | 12 - .../System/Version/Overview/vb/clickonce.vb | 13 - .../Version/Overview/vb/comparisons1.vb | 28 - .../Version/Overview/vb/comparisons2.vb | 29 - .../System/Version/Overview/vb/currentapp.vb | 17 - .../Version/Overview/vb/currentassem.vb | 17 - .../Version/Overview/vb/specificassem.vb | 17 - .../CustomReflectionContextExample.csproj | 12 - .../csharp/program.cs | 82 -- .../system-accessviolationexception.md | 36 - .../runtime-libraries/system-appcontext.md | 129 -- .../system-appdomain-unhandledexception.md | 35 - .../runtime-libraries/system-boolean.md | 156 --- .../runtime-libraries/system-byte.md | 84 -- .../runtime-libraries/system-char.md | 97 -- .../system-collections-generic-hashset{t}.md | 58 - .../system-collections-generic-list{t}.md | 70 - ...yedcollection{tkey,titem}-changeitemkey.md | 22 - ...ons-objectmodel-observablecollection{t}.md | 35 - .../runtime-libraries/system-console.md | 145 --- .../runtime-libraries/system-convert.md | 120 -- .../system-data-commandbehavior.md | 23 - .../system-data-datacolumn-expression.md | 298 ----- .../runtime-libraries/system-data-dataset.md | 38 - .../system-data-datatable.md | 44 - .../system-datetime-tobinary.md | 35 - .../system-datetime-tryparse.md | 49 - .../runtime-libraries/system-datetime.md | 402 ------ .../runtime-libraries/system-decimal.md | 56 - .../system-delegate-createdelegate.md | 121 -- ...stem-diagnostics-performancecountertype.md | 140 -- ...ostics-processstartinfo-useshellexecute.md | 28 - .../system-diagnostics-tracing-eventsource.md | 74 -- ...agnostics-tracing-eventwritteneventargs.md | 26 - .../system-double-compareto.md | 48 - .../system-double-epsilon.md | 37 - .../runtime-libraries/system-double-equals.md | 54 - .../runtime-libraries/system-double.md | 214 ---- .../system-drawing-drawing2d-matrix.md | 51 - .../system-dynamic-expandoobject.md | 133 -- .../runtime-libraries/system-enum.md | 195 --- ...stem-environment-getenvironmentvariable.md | 61 - .../system-exception-data.md | 32 - .../system-exception-message.md | 27 - .../runtime-libraries/system-exception.md | 230 ---- .../system-flagsattribute.md | 60 - .../runtime-libraries/system-gc.md | 44 - .../system-globalization-compareinfo.md | 34 - .../system-globalization-compareoptions.md | 22 - ...zation-cultureandregioninfobuilder-ctor.md | 32 - ...obalization-cultureandregioninfobuilder.md | 66 - ...lobalization-cultureinfo-currentculture.md | 87 -- ...balization-cultureinfo-currentuiculture.md | 71 -- ...balization-cultureinfo-invariantculture.md | 34 - .../system-globalization-cultureinfo.md | 227 ---- ...system-globalization-datetimeformatinfo.md | 282 ----- .../system-globalization-numberformatinfo.md | 234 ---- .../system-globalization-persiancalendar.md | 36 - .../system-globalization-regioninfo.md | 38 - .../system-globalization-sortkey.md | 46 - .../system-globalization-sortversion.md | 51 - .../system-iasyncdisposable.md | 27 - .../runtime-libraries/system-idisposable.md | 98 -- .../runtime-libraries/system-int32.md | 76 -- .../runtime-libraries/system-int64.md | 76 -- .../system-invalidcastexception.md | 108 -- .../system-invalidoperationexception.md | 256 ---- .../runtime-libraries/system-io-filestream.md | 36 - .../system-io-filesystemwatcher.md | 51 - ...ystem-linq-expressions-binaryexpression.md | 73 -- .../system-linq-expressions-expression-add.md | 34 - .../system-midpointrounding.md | 59 - .../system-net-ftpwebrequest-proxy.md | 19 - .../system-net-http-httpclient.md | 144 --- .../system-net-http-httpclienthandler.md | 14 - .../system-net-httplistener.md | 52 - .../system-net-sockets-socket.md | 28 - .../system-notimplementedexception.md | 33 - .../system-notsupportedexception.md | 97 -- .../runtime-libraries/system-nullable.md | 22 - .../runtime-libraries/system-nullable{t}.md | 32 - .../system-numerics-biginteger.md | 126 -- .../system-numerics-complex.md | 100 -- .../runtime-libraries/system-object-equals.md | 155 --- .../system-object-finalize.md | 81 -- .../system-object-gethashcode.md | 77 -- .../system-object-tostring.md | 154 --- .../runtime-libraries/system-object.md | 28 - .../runtime-libraries/system-random.md | 242 ---- ...lection-context-customreflectioncontext.md | 33 - .../system-reflection-emit-assemblybuilder.md | 94 -- .../system-reflection-emit-dynamicilinfo.md | 20 - ...ction-emit-dynamicmethod-createdelegate.md | 56 - ...stem-reflection-emit-dynamicmethod-ctor.md | 84 -- ...ction-emit-dynamicmethod-getilgenerator.md | 40 - ...em-reflection-emit-dynamicmethod-invoke.md | 34 - ...n-emit-dynamicmethod-issecuritycritical.md | 44 - .../system-reflection-emit-dynamicmethod.md | 52 - .../system-reflection-emit-methodbuilder.md | 43 - ...eflection-emit-persistedassemblybuilder.md | 132 -- .../system-reflection-emit-typebuilder.md | 42 - ...tableexecutable-debugdirectoryentrytype.md | 27 - ...ources-missingmanifestresourceexception.md | 49 - ...urces-neutralresourceslanguageattribute.md | 118 -- .../system-resources-resourcemanager-ctor.md | 123 -- ...tem-resources-resourcemanager-getobject.md | 103 -- ...tem-resources-resourcemanager-getstring.md | 106 -- .../system-resources-resourcemanager.md | 308 ----- .../system-resources-resourcereader.md | 111 -- ...urces-satellitecontractversionattribute.md | 20 - ...lerservices-internalsvisibletoattribute.md | 62 - ...ilerservices-runtimehelpers-gethashcode.md | 49 - ...em-runtime-interopservices-comexception.md | 31 - ...tem-runtime-interopservices-comwrappers.md | 57 - ...untime-interopservices-icustommarshaler.md | 154 --- ...interopservices-marshal-getactiveobject.md | 16 - ...stem-runtime-interopservices-safehandle.md | 39 - ...stem-runtime-loader-assemblyloadcontext.md | 58 - ...ime-serialization-datacontractattribute.md | 45 - ...me-serialization-datacontractserializer.md | 49 - ...ime-serialization-iextensibledataobject.md | 24 - ...e-serialization-xsddatacontractexporter.md | 33 - ...versioning-componentguaranteesattribute.md | 132 -- ...y-cryptography-rsacryptoserviceprovider.md | 22 - ...tem-security-cryptography-rsaparameters.md | 47 - ...tem-security-cryptography-xml-signedxml.md | 148 --- .../system-security-securestring.md | 112 -- .../system-single-compareto.md | 46 - .../system-single-epsilon.md | 37 - .../runtime-libraries/system-single-equals.md | 49 - .../runtime-libraries/system-single.md | 223 ---- .../runtime-libraries/system-span{t}.md | 61 - .../runtime-libraries/system-string-ctor.md | 190 --- .../runtime-libraries/system-string-format.md | 343 ----- .../runtime-libraries/system-string-intern.md | 31 - .../system-string-isnullorempty.md | 36 - .../runtime-libraries/system-string.md | 459 ------- .../system-stringcomparer.md | 23 - .../system-text-encoding-default.md | 19 - .../runtime-libraries/system-text-encoding.md | 211 ---- ...tem-text-regularexpressions-regex-match.md | 46 - .../system-text-regularexpressions-regex.md | 132 -- .../runtime-libraries/system-text-rune.md | 199 --- .../system-text-stringbuilder.md | 207 --- .../system-threading-monitor-wait.md | 60 - .../system-threading-monitor.md | 121 -- .../system-threading-readerwriterlockslim.md | 137 -- .../system-threading-tasks-task.md | 105 -- .../system-threading-tasks-taskscheduler.md | 64 - .../system-threading-thread.md | 166 --- .../system-timespan-parse.md | 45 - .../system-timespan-tryparse.md | 82 -- .../runtime-libraries/system-timespan.md | 95 -- .../system-type-getproperty.md | 83 -- .../runtime-libraries/system-type-gettype.md | 136 -- .../system-type-makegenerictype.md | 69 - .../runtime-libraries/system-type.md | 84 -- .../system-typeinitializationexception.md | 117 -- .../runtime-libraries/system-uri.md | 155 --- .../runtime-libraries/system-version.md | 93 -- .../system-xml-linq-xname.md | 126 -- .../system-xml-linq-xnamespace.md | 179 --- .../system-xml-schema-xmlschemaset.md | 51 - ...xml-serialization-codegenerationoptions.md | 23 - .../system-xml-serialization-xmlserializer.md | 201 --- .../system-xml-xmlconvert.md | 44 - .../system-xml-xmldocument.md | 214 ---- .../system-xml-xmlreader-create.md | 92 -- .../runtime-libraries/system-xml-xmlreader.md | 291 ----- ...tem-xml-xmlreadersettings-dtdprocessing.md | 25 - .../system-xml-xmlreadersettings-schemas.md | 25 - .../system-xml-xmlreadersettings.md | 34 - .../system-xml-xmlresolver.md | 53 - .../system-xml-xmlsecureresolver.md | 103 -- .../system-xml-xmltextreader.md | 58 - .../system-xml-xmltextwriter.md | 109 -- .../runtime-libraries/system-xml-xmlwriter.md | 133 -- .../system-xml-xsl-xslcompiledtransform.md | 30 - docs/fundamentals/toc.yml | 368 +----- docs/navigate/advanced-programming/toc.yml | 42 - docs/navigate/data-access/toc.yml | 56 - docs/navigate/security/toc.yml | 10 - docs/navigate/tools-diagnostics/toc.yml | 8 - docs/standard/base-types/formatting-types.md | 2 +- .../implementing-dispose.md | 2 +- .../migrate-to-datacontractserializer.md | 2 +- 1545 files changed, 736 insertions(+), 80631 deletions(-) delete mode 100644 docs/fundamentals/runtime-libraries/includes/c-and-posix-cultures.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/calendar-era.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/context.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/interpolated-strings.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/stringbuilder-perf-note.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/system-drawing-common.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/unicode-categories.md delete mode 100644 docs/fundamentals/runtime-libraries/includes/untrusted-data-class-note.md delete mode 100644 docs/fundamentals/runtime-libraries/media/gdip-art10.gif delete mode 100644 docs/fundamentals/runtime-libraries/media/gdip-art12.gif delete mode 100644 docs/fundamentals/runtime-libraries/microsoft-win32-registry.md delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/module1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/addremoveinsert.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/listclass.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/averagecount32.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/elapsedtime.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/averagetimer32.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems32.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems64.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond32.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond64.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rawfraction.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagecount32.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagetimer32.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/elapsedtime.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems32.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems64.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/program.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond32.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond64.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rawfraction.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Class1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Class1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/module1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Async1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Get1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/aspculture13.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/changeculture11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/specific12.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Async1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Get1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Program.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/aspculture13.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/changeculture11.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/specific12.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Async1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Get1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/currentuiculture1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Async1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Get1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/currentuiculture1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/persist1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/persist1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/appdomainex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/change1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/changeui1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/current1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/currentui1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/defaultthread1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/getcultures1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/setthreads1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example5.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/formatprovider1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate6.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_currency1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_ssn1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/formatprovider1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate5.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate6.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parse1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parsepersisted.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parseuser1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/propertyvalues1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/BigInteger_Examples.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Mutability_Examples.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/BigInteger_Examples.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Mutability_Examples.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/create1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/customfmt1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/nan1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/precision1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Program.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/create1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/customfmt1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/nan1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/precision1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/CreateAndRunAssembly.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/GenerateMetadataSnippets.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/example.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/resourcenames.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showtime.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/resourcenames.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/example.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/example.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/ctor1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/example.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/greet.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/example.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/greet.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/createresources.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/numberinfo.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/shownumbers.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/createresources.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/numberinfo.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/shownumbers.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/ctor1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/rmc.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/ctor1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/resourcenames.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/rmc.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showdate.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showtime.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/class1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/createresourceex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/ctor1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/readresourceex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/class1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/ctor1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/gethashcodeex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/gethashcodeex1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/apply1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/apply1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/startat.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/caching1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/regex_example1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/words.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/regex_example1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/words.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/getencoding1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/getencoding1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/caching1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInSpan.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInString.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/EncodeRune.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/FindFirstLetter.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/InstantiateRunes.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/SplitStringOnChar.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/TrimNonLettersAndNonDigits.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/WorkWithSurrogates.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/fsharp/CountLettersInString.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/chars1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/default1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/delete1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/expand1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/immutability2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/instantiate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/replace1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/chars1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/default1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/delete1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/expand1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/immutability2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/instantiate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/replace1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/chars1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/default1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/delete1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/expand1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/instantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/replace1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WhenAny1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/run1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WhenAny1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/run1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAny1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/run1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.config delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/mainwindow.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/mainwindow.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/Application.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/Application.xaml.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/AssemblyInfo.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/MainWindow.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/MainWindow.xaml.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/Overview/vb/WpfApp.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/Pattern2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/badbox1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/badlock1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/example1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/Pattern2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/badbox1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/badlock1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/example1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Monitor/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/ReaderWriterLockSlim/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/ReaderWriterLockSlim/Overview/csharp/classexample1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/ReaderWriterLockSlim/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/ReaderWriterLockSlim/Overview/vb/classexample1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/BackgroundEx1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/Instance1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/ThreadStart1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/ThreadStart2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/fsharp/BackgroundEx1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/fsharp/Instance1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/fsharp/ThreadStart1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/fsharp/ThreadStart2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/BackgroundEx1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/Instance1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/ThreadStart1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/ThreadStart2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Threading/Thread/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml.Schema/XmlSchemaSet/Overview/vb/project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml.Schema/XmlSchemaSet/Overview/vb/validschemaset.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml.Schema/XmlSchemaSet/Overview/xml/books.xsd delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml.Schema/XmlSchemaSet/Overview/xml/booksschemafail.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/app.config delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/booksdata.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/booksdata.xsd delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/constants.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/deleteicon.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/downarrow.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/form1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/form1.designer.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/form1.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/output-build.txt delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/packages.config delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/refreshtree.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/save.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source5.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source6.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/uparrow.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/xmlhelpermethods.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/xmlprocessingapp.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source-element.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source-lastchild.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source-nextsibling.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source-tag.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/Non-WinForms/source5.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/booksdata.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/booksdata.xsd delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/constants.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/downarrow.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/form1.designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/form1.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/form1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/my project/application.designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/my project/assemblyinfo.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/my project/resources.designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/my project/resources.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/my project/settings.designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/refreshtree.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/save.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/snippets.5000.json delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/uparrow.png delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/xmlhelpermethods.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/vb/WinForms/xmlprocessingappvb.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlLinkedNode/csharp/PreviousSibling/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlLinkedNode/csharp/PreviousSibling/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlParserContext/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlParserContext/Overview/csharp/XmlReader_Create.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/csharp/factory_rdr_cctor2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/csharp/factory_rdr_cctor21.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/vb/XmlReader_Create.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Create/vb/factory_rdr_cctor2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/csharp/XmlReader_Basic.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/csharp/readElementContentAs.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/vb/module1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/vb/readElementContentAs.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/vb/xmlreader_basic.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/dataFile.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/hireDate.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/hireDate.xsd delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/hireDate_1.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/item.xml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReader/Overview/xml/item.xsd delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReaderSettings/ValidationType/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlReaderSettings/ValidationType/csharp/validschemaset.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlResolver/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlResolver/Overview/csharp/Xslt_Load_v2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlResolver/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlResolver/Overview/vb/Xslt_Load_v2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlResolver/Overview/vb/factory_rdr_cctor2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlSecureResolver/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlSecureResolver/Overview/csharp/XmlSecureResolver_ex.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlSecureResolver/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlSecureResolver/Overview/vb/XmlSecureResolver_ex.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlWriter/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlWriter/Overview/csharp/writer_v2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlWriter/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlWriter/Overview/vb/writer_v2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V1/Example4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V1/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V2/Example6.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V2/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V3/Example8.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/csharp/V3/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/fsharp/Example4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/fsharp/Example6.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/fsharp/Example8.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V1/Example4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V1/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V2/Example6.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V2/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V3/Example8.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/AppContext/Overview/vb/V3/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/binary1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/conversion1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/conversion3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/format3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/operations1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/operations2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/parse2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/parse3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/size1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/tostring1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/csharp/tostring2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/binary1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/conversion1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/conversion3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/format3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/operations1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/operations2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/parse2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/parse3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/size1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/tostring1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/fsharp/tostring2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/binary1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/conversion1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/conversion3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/format3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/operations1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/operations2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/parse2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/parse3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/tostring1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Boolean/Overview/vb/tostring2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/bitwise1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/bitwise2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/byteinstantiation1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/formatting1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/csharp/tobyte1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/fsharp/bitwise1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/fsharp/bitwise2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/fsharp/byteinstantiation1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/fsharp/formatting1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/fsharp/tobyte1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/vb/bitwise1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/vb/bitwise2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/vb/byteinstantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Byte/Overview/vb/formatting1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/GetUnicodeCategory3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/charstructure.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/grapheme1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/normalized.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/surrogate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/textelements2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/csharp/textelements2a.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/GetUnicodeCategory3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/grapheme1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/normalized.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/surrogate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/textelements2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/fsharp/textelements2a.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/GetUnicodeCategory3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/grapheme1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/normalized.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/surrogate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/textelements2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Char/Overview/vb/textelements2a.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/example3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/fontlink1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/normalize1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/setfont1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/csharp/unicode1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/example3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/fontlink1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/normalize1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/setfont1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/fsharp/unicode1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/example3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/fontlink1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/normalize1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/setfont1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Console/Overview/vb/unicode1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/csharp/NonDecimal1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/csharp/converter.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/fsharp/NonDecimal1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/fsharp/converter.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/NonDecimal1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/converter.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/tobyte1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/toint32_1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/Overview/vb/toint64_1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt32/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt32/csharp/toint32_1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt64/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt64/csharp/toint64_1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt64/fsharp/formatting1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Convert/ToInt64/fsharp/toint64_1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/FromBinary/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/FromBinary/csharp/frombinary1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/FromBinary/fsharp/frombinary1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/FromBinary/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/FromBinary/vb/frombinary1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Calendar.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/DateTimeComparisons.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Instantiation.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Parsing.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Persistence.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/Resolution.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/csharp/StringFormat.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/Calendar.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/DateTimeComparisons.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/Instantiation.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/Parsing.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/Persistence.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/Resolution.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/fsharp/StringFormat.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/Calendar.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/DateTimeComparisons.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/Instantiation.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/Parsing.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/Resolution.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/DateTime/Overview/vb/StringFormat.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/csharp/DecimalDivision_46630_1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/fsharp/DecimalDivision_46630_1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/vb/DecimalDivision_46630_1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Decimal/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/csharp/openClosedOver.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/csharp/source1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/fsharp/openClosedOver.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/fsharp/source1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/vb/openClosedOver.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Delegate/CreateDelegate/vb/source1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/csharp/compareto2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/csharp/compareto3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/fsharp/compareto2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/fsharp/compareto3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/vb/compareto2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/CompareTo/vb/compareto3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/csharp/Equals_25051.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/csharp/epsilon.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/csharp/epsilon1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/fsharp/Equals_25051.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/fsharp/epsilon.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/fsharp/epsilon1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/vb/Equals_25051.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/vb/epsilon.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Epsilon/vb/epsilon1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Equals/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Equals/csharp/equalsabs1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Equals/fsharp/equalsabs1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Equals/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Equals/vb/equalsabs1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/comparison1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/comparison3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/comparison4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/convert1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/convert2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/exceptional1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/exceptional2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/precision1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/precisionlist1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/precisionlist3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/precisionlist4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/representation1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/representation2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/Project.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/comparison1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/comparison3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/comparison4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/convert1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/convert2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/exceptional1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/exceptional2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precision1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/representation1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/representation2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/comparison1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/comparison3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/comparison4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/convert1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/convert2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/exceptional1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/exceptional2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/precision1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/precisionlist1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/precisionlist3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/precisionlist4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/precisionlist5.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/representation1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/representation2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/EnumMain.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/Extensions.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/class1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/class2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classbitwise1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classconversion1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classconversion2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classformat1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classiterate.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/csharp/classparse1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/EnumMain.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/Extensions.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/class1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/class2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classbitwise1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classconversion1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classconversion2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classformat1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classiterate.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/fsharp/classparse1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/EnumMain.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/Extensions.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/class1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/class2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classbitwise1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classconversion1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classconversion2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classformat1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classiterate.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Enum/Overview/vb/classparse1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/HelpLink/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/HelpLink/csharp/properties.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/HelpLink/fsharp/properties.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/HelpLink/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/HelpLink/vb/properties.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/ToString2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/basetoderived1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/catchexception.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/example.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/iconvertible1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/notprimeexception.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/primenumbergenerator.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/rethrow1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/rethrow3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/usageerrors1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/csharp/usageerrors2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/catchexception.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/example.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/notprimeexception.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/primenumbergenerator.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/rethrow1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/rethrow3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/usageerrors1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/fsharp/usageerrors2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/catchexception.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/example.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/notprimeexception.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/primenumbergenerator.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/rethrow1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/rethrow3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/usageerrors1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Exception/Overview/vb/usageerrors2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/csharp/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/csharp/flags.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/csharp/flags1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/fsharp/flags.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/fsharp/flags1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/vb/flags.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FlagsAttribute/Overview/vb/flags1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/FormatExample2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/formatoverload1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/formatoverload2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/formatsyntax1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/interceptor2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa-interpolated1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa-interpolated2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa21.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa26.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa27.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa28.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa29.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/qa3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/starting1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/starting2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/csharp/starting3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/FormatExample2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/formatoverload1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/formatoverload2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/formatsyntax1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/interceptor2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa-interpolated1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa-interpolated2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa11.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa21.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa26.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa27.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa28.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa29.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/qa3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/starting1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/starting2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/starting3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/base1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/base2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/calling1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/calling2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/csharp/derived1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/fsharp/base1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/fsharp/base2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/fsharp/calling1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/fsharp/calling2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/fsharp/derived1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/base1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/base2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/calling1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/calling2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/IDisposable/Overview/vb/derived1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/csharp/Formatting1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/csharp/Instantiate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/fsharp/Formatting1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/fsharp/Instantiate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/fsharp/toint32_1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/vb/Formatting1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/vb/Instantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int32/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/csharp/formatting1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/csharp/instantiate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/fsharp/instantiate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/vb/formatting1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Int64/Overview/vb/instantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/Interface1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/ToString1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/ToString2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/basetoderived1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/iconvertible1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/fsharp/Interface1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/fsharp/ToString1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/fsharp/ToString2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/fsharp/basetoderived1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/fsharp/iconvertible1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/vb/Interface1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/vb/basetoderived1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidCastException/Overview/vb/iconvertible1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable5.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Enumerable6.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Iterating1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Iterating2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Iterating3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/List_Sort1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/List_Sort2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/List_Sort3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/List_Sort4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Nullable1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/Nullable2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/Other/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/App1.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/App1.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/MainWindow.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/MainWindow.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/WPFCrossThreadCS.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF1/app.config delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF2/App2.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF2/App2.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF2/MainWindow1.xaml delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF2/MainWindowDispatcher.xaml.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WPF2/WPFCrossThreadDispatcherCS.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form1.Designer.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form1.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form11.Designer.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Form11.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/Program1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/csharp/WinForms/WFCrossThreadCS.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable5.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable6.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Iterating1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Iterating2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Iterating3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/List_Sort1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/List_Sort2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/List_Sort3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/List_Sort4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Nullable1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Nullable2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable5.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Enumerable6.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Iterating1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Iterating2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Iterating3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/List_Sort1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/List_Sort2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/List_Sort3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/List_Sort4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Nullable1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Nullable2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/Other/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/ApplicationEvents.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form1.Designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form1.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form11.Designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form11.resx delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/Form11.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/My Project/Application.Designer.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/My Project/Application.myapp delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/vb/WinForms/WinFormsApp1.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/csharp/BadState1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/csharp/TestProp1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/csharp/TestProp2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/fsharp/BadState1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/fsharp/TestProp1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/fsharp/TestProp2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/vb/BadState1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/vb/TestProp1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/NotSupportedException/Overview/vb/TestProp2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals_ref.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals_val1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equals_val2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equalsoverride.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/csharp/equalssb1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/Project.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals_ref.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals_val1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equals_val2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equalsoverride.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/fsharp/equalssb1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals_ref.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals_val1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equals_val2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equalsoverride.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Equals/vb/equalssb1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Finalize/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Finalize/csharp/finalize_safe.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Finalize/fsharp/finalize_safe.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Finalize/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/Finalize/vb/finalize_safe.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/csharp/direct1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/csharp/shift1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/csharp/xor1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/csharp/xor2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/fsharp/Project.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/fsharp/direct1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/fsharp/shift1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/fsharp/xor1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/fsharp/xor2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/vb/direct1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/vb/shift1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/vb/xor1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/GetHashCode/vb/xor2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/array1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/customize1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/customize2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/tostring1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/tostring2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/tostring3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/tostringoverload1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/csharp/tostringoverload2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/array1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/customize1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/customize2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/tostring1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/tostring2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/tostring3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/tostringoverload1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/fsharp/tostringoverload2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/array1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/customize1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/customize2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/tostring1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/tostring2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/tostring3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/tostringoverload1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Object/ToString/vb/tostringoverload2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/Random1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/array1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/booleans1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/booleans2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/bytes1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/doublerange1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/doublerange2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/doublerange3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/long1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/nextbytes1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/nextdoubleex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/nextex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/range1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/range2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/same1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/threadsafeex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/threadsafeex2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/unique.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/uniquearray1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/Random1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/array1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/booleans1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/booleans2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/bytes1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/doublerange1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/doublerange2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/doublerange3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/long1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/nextbytes1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/nextdoubleex1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/nextex1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/range1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/range2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/same1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/threadsafeex1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/threadsafeex2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/unique.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/fsharp/uniquearray1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/Random1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/array1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/booleans1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/booleans2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/bytes1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/doublerange1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/doublerange2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/doublerange3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/long1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/nextbytes1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/nextdoubleex1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/nextex1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/range1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/range2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/same1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/threadsafeex1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/threadsafeex2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/unique.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/vb/uniquearray1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/csharp/compareto2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/csharp/compareto3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/fsharp/compareto2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/fsharp/compareto3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/vb/compareto2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/CompareTo/vb/compareto3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/csharp/SingleEquals_25051.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/csharp/epsilon.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/csharp/epsilon1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/fsharp/SingleEquals_25051.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/fsharp/epsilon.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/fsharp/epsilon1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/vb/SingleEquals_25051.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/vb/epsilon.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Epsilon/vb/epsilon1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Equals/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Equals/csharp/equalsabs1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Equals/fsharp/equalsabs1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Equals/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Equals/vb/equalsabs1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/comparison1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/comparison2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/comparison3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/comparison4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/convert1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/convert2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/exceptional1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/exceptional2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/precisionlist1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/precisionlist3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/precisionlist4a.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/representation1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/csharp/representation2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/Project.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/comparison1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/comparison2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/comparison3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/comparison4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/convert1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/convert2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/exceptional1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/exceptional2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/precisionlist1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/precisionlist3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/precisionlist4a.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/representation1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/representation2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/PrecisionList4a.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/PrecisionList5a.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/comparison1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/comparison2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/comparison3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/comparison4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/convert1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/convert2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/exceptional1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/exceptional2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/precisionlist1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/precisionlist3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/representation1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/vb/representation2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Overview/csharp/Program2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Overview/fsharp/program.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/csharp/Program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/csharp/Program2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/csharp/slice.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/fsharp/Program.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/fsharp/Program2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Span/Slice/fsharp/fs.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/cpp/sbyte_ctor1.cpp delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/char2_ctor.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/chptrctor_null.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/ctor1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/ctor2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/ptrctor_null.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/char2_ctor.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/chptrctor_null.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/ctor1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/ctor2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/ptrctor_null.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/vb/ctor1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/.ctor/vb/source.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/csharp/Example1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/fsharp/Example1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/Example1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/FormatExample2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/formatoverload1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/formatoverload2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/formatsyntax1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/interceptor2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa-interpolated1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa-interpolated2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa26.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa27.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa28.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa29.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/qa3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/starting1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Format/vb/starting2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/csharp/Intern1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/fsharp/Intern1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/fsharp/fs.fsproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/vb/Intern1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Intern/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/csharp/NullString1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/csharp/isnullorempty1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/fsharp/NullString1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/fsharp/NullString2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/fsharp/isnullorempty1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/vb/NullString1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/IsNullOrEmpty/vb/isnullorempty1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/case1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/case2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/compare11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/compare2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/compare3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/compare4.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/equality1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/format1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/grapheme1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/immutable.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/immutable1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/index11.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/index2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/index3.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/normalize1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/nullorempty1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/parse1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/search1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/sort1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/surrogate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/case1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/case2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/compare11.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/compare2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/compare3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/compare4.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/equality1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/format1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/grapheme1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/immutable.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/immutable1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/index11.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/index2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/index3.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/normalize1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/nullorempty1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/parse1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/program.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/search1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/sort1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/fsharp/surrogate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/case1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/case2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/compare1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/compare2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/compare3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/compare4.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/equality1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/format1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/grapheme1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/immutable.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/immutable1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/index1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/index2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/index3.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/instantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/normalize1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/nullorempty1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/parse1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/search1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/sort1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/String/Overview/vb/surrogate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/instantiate1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/legacycode1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/perappdomain1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/showtimespan.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/csharp/zero1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/fsharp/instantiate1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/fsharp/legacycode1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/fsharp/perappdomain1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/fsharp/showtimespan.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/fsharp/zero1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/instantiate1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/legacycode1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/perappdomain1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/showtimespan.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Overview/vb/zero1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Parse/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Parse/csharp/parsefailure1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Parse/fsharp/parsefailure1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Parse/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/Parse/vb/parsefailure1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/TryParse/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/TryParse/csharp/tryparsefailure1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/TryParse/fsharp/tryparsefailure1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/TryParse/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TimeSpan/TryParse/vb/tryparsefailure1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/GetType/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/GetType/csharp/source.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/GetType/fsharp/source.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/MakeGenericType/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/MakeGenericType/csharp/remarks.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/MakeGenericType/fsharp/remarks.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/MakeGenericType/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/MakeGenericType/vb/remarks.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/csharp/Equals1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/csharp/GetType1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/fsharp/Equals1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/fsharp/GetType1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/vb/Equals1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/vb/GetType1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Type/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/csharp/Missing1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/csharp/Missing1a.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/csharp/Regex1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/csharp/ctorException1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/csharp/project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/fsharp/Missing1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/fsharp/Missing1a.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/fsharp/Regex1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/CtorException1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/GettingVersions1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/Missing1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/Missing1a.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/TypeInitializationException/Overview/vb/Regex1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/GettingVersions1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/Project.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/clickonce.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/comparisons1.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/comparisons2.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/currentapp.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/currentassem.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/csharp/specificassem.cs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/GettingVersions1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/comparisons1.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/comparisons2.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/currentapp.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/currentassem.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/specificassem.fs delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/Project.vbproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/clickonce.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/comparisons1.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/comparisons2.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/currentapp.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/currentassem.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/vb/specificassem.vb delete mode 100644 docs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/CustomReflectionContextExample.csproj delete mode 100644 docs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/program.cs delete mode 100644 docs/fundamentals/runtime-libraries/system-accessviolationexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-appcontext.md delete mode 100644 docs/fundamentals/runtime-libraries/system-appdomain-unhandledexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-boolean.md delete mode 100644 docs/fundamentals/runtime-libraries/system-byte.md delete mode 100644 docs/fundamentals/runtime-libraries/system-char.md delete mode 100644 docs/fundamentals/runtime-libraries/system-collections-generic-hashset{t}.md delete mode 100644 docs/fundamentals/runtime-libraries/system-collections-generic-list{t}.md delete mode 100644 docs/fundamentals/runtime-libraries/system-collections-objectmodel-keyedcollection{tkey,titem}-changeitemkey.md delete mode 100644 docs/fundamentals/runtime-libraries/system-collections-objectmodel-observablecollection{t}.md delete mode 100644 docs/fundamentals/runtime-libraries/system-console.md delete mode 100644 docs/fundamentals/runtime-libraries/system-convert.md delete mode 100644 docs/fundamentals/runtime-libraries/system-data-commandbehavior.md delete mode 100644 docs/fundamentals/runtime-libraries/system-data-datacolumn-expression.md delete mode 100644 docs/fundamentals/runtime-libraries/system-data-dataset.md delete mode 100644 docs/fundamentals/runtime-libraries/system-data-datatable.md delete mode 100644 docs/fundamentals/runtime-libraries/system-datetime-tobinary.md delete mode 100644 docs/fundamentals/runtime-libraries/system-datetime-tryparse.md delete mode 100644 docs/fundamentals/runtime-libraries/system-datetime.md delete mode 100644 docs/fundamentals/runtime-libraries/system-decimal.md delete mode 100644 docs/fundamentals/runtime-libraries/system-delegate-createdelegate.md delete mode 100644 docs/fundamentals/runtime-libraries/system-diagnostics-performancecountertype.md delete mode 100644 docs/fundamentals/runtime-libraries/system-diagnostics-processstartinfo-useshellexecute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-diagnostics-tracing-eventsource.md delete mode 100644 docs/fundamentals/runtime-libraries/system-diagnostics-tracing-eventwritteneventargs.md delete mode 100644 docs/fundamentals/runtime-libraries/system-double-compareto.md delete mode 100644 docs/fundamentals/runtime-libraries/system-double-epsilon.md delete mode 100644 docs/fundamentals/runtime-libraries/system-double-equals.md delete mode 100644 docs/fundamentals/runtime-libraries/system-double.md delete mode 100644 docs/fundamentals/runtime-libraries/system-drawing-drawing2d-matrix.md delete mode 100644 docs/fundamentals/runtime-libraries/system-dynamic-expandoobject.md delete mode 100644 docs/fundamentals/runtime-libraries/system-enum.md delete mode 100644 docs/fundamentals/runtime-libraries/system-environment-getenvironmentvariable.md delete mode 100644 docs/fundamentals/runtime-libraries/system-exception-data.md delete mode 100644 docs/fundamentals/runtime-libraries/system-exception-message.md delete mode 100644 docs/fundamentals/runtime-libraries/system-exception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-flagsattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-gc.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-compareinfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-compareoptions.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder-ctor.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-currentculture.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-currentuiculture.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-invariantculture.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-cultureinfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-datetimeformatinfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-numberformatinfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-persiancalendar.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-regioninfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-sortkey.md delete mode 100644 docs/fundamentals/runtime-libraries/system-globalization-sortversion.md delete mode 100644 docs/fundamentals/runtime-libraries/system-iasyncdisposable.md delete mode 100644 docs/fundamentals/runtime-libraries/system-idisposable.md delete mode 100644 docs/fundamentals/runtime-libraries/system-int32.md delete mode 100644 docs/fundamentals/runtime-libraries/system-int64.md delete mode 100644 docs/fundamentals/runtime-libraries/system-invalidcastexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-invalidoperationexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-io-filestream.md delete mode 100644 docs/fundamentals/runtime-libraries/system-io-filesystemwatcher.md delete mode 100644 docs/fundamentals/runtime-libraries/system-linq-expressions-binaryexpression.md delete mode 100644 docs/fundamentals/runtime-libraries/system-linq-expressions-expression-add.md delete mode 100644 docs/fundamentals/runtime-libraries/system-midpointrounding.md delete mode 100644 docs/fundamentals/runtime-libraries/system-net-ftpwebrequest-proxy.md delete mode 100644 docs/fundamentals/runtime-libraries/system-net-http-httpclient.md delete mode 100644 docs/fundamentals/runtime-libraries/system-net-http-httpclienthandler.md delete mode 100644 docs/fundamentals/runtime-libraries/system-net-httplistener.md delete mode 100644 docs/fundamentals/runtime-libraries/system-net-sockets-socket.md delete mode 100644 docs/fundamentals/runtime-libraries/system-notimplementedexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-notsupportedexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-nullable.md delete mode 100644 docs/fundamentals/runtime-libraries/system-nullable{t}.md delete mode 100644 docs/fundamentals/runtime-libraries/system-numerics-biginteger.md delete mode 100644 docs/fundamentals/runtime-libraries/system-numerics-complex.md delete mode 100644 docs/fundamentals/runtime-libraries/system-object-equals.md delete mode 100644 docs/fundamentals/runtime-libraries/system-object-finalize.md delete mode 100644 docs/fundamentals/runtime-libraries/system-object-gethashcode.md delete mode 100644 docs/fundamentals/runtime-libraries/system-object-tostring.md delete mode 100644 docs/fundamentals/runtime-libraries/system-object.md delete mode 100644 docs/fundamentals/runtime-libraries/system-random.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-context-customreflectioncontext.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicilinfo.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-createdelegate.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-ctor.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-getilgenerator.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-invoke.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-issecuritycritical.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-methodbuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-emit-typebuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-reflection-portableexecutable-debugdirectoryentrytype.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-missingmanifestresourceexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-neutralresourceslanguageattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-resourcemanager-ctor.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-resourcemanager-getobject.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-resourcemanager-getstring.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-resourcemanager.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-resourcereader.md delete mode 100644 docs/fundamentals/runtime-libraries/system-resources-satellitecontractversionattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-compilerservices-internalsvisibletoattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-compilerservices-runtimehelpers-gethashcode.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-interopservices-comexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-interopservices-comwrappers.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-interopservices-icustommarshaler.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-interopservices-marshal-getactiveobject.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-interopservices-safehandle.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-loader-assemblyloadcontext.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-serialization-datacontractattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-serialization-datacontractserializer.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-serialization-iextensibledataobject.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-serialization-xsddatacontractexporter.md delete mode 100644 docs/fundamentals/runtime-libraries/system-runtime-versioning-componentguaranteesattribute.md delete mode 100644 docs/fundamentals/runtime-libraries/system-security-cryptography-rsacryptoserviceprovider.md delete mode 100644 docs/fundamentals/runtime-libraries/system-security-cryptography-rsaparameters.md delete mode 100644 docs/fundamentals/runtime-libraries/system-security-cryptography-xml-signedxml.md delete mode 100644 docs/fundamentals/runtime-libraries/system-security-securestring.md delete mode 100644 docs/fundamentals/runtime-libraries/system-single-compareto.md delete mode 100644 docs/fundamentals/runtime-libraries/system-single-epsilon.md delete mode 100644 docs/fundamentals/runtime-libraries/system-single-equals.md delete mode 100644 docs/fundamentals/runtime-libraries/system-single.md delete mode 100644 docs/fundamentals/runtime-libraries/system-span{t}.md delete mode 100644 docs/fundamentals/runtime-libraries/system-string-ctor.md delete mode 100644 docs/fundamentals/runtime-libraries/system-string-format.md delete mode 100644 docs/fundamentals/runtime-libraries/system-string-intern.md delete mode 100644 docs/fundamentals/runtime-libraries/system-string-isnullorempty.md delete mode 100644 docs/fundamentals/runtime-libraries/system-string.md delete mode 100644 docs/fundamentals/runtime-libraries/system-stringcomparer.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-encoding-default.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-encoding.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-regularexpressions-regex-match.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-regularexpressions-regex.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-rune.md delete mode 100644 docs/fundamentals/runtime-libraries/system-text-stringbuilder.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-monitor-wait.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-monitor.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-readerwriterlockslim.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-tasks-task.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-tasks-taskscheduler.md delete mode 100644 docs/fundamentals/runtime-libraries/system-threading-thread.md delete mode 100644 docs/fundamentals/runtime-libraries/system-timespan-parse.md delete mode 100644 docs/fundamentals/runtime-libraries/system-timespan-tryparse.md delete mode 100644 docs/fundamentals/runtime-libraries/system-timespan.md delete mode 100644 docs/fundamentals/runtime-libraries/system-type-getproperty.md delete mode 100644 docs/fundamentals/runtime-libraries/system-type-gettype.md delete mode 100644 docs/fundamentals/runtime-libraries/system-type-makegenerictype.md delete mode 100644 docs/fundamentals/runtime-libraries/system-type.md delete mode 100644 docs/fundamentals/runtime-libraries/system-typeinitializationexception.md delete mode 100644 docs/fundamentals/runtime-libraries/system-uri.md delete mode 100644 docs/fundamentals/runtime-libraries/system-version.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-linq-xname.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-linq-xnamespace.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-schema-xmlschemaset.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-serialization-codegenerationoptions.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-serialization-xmlserializer.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlconvert.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmldocument.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlreader-create.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlreader.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings-dtdprocessing.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings-schemas.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlresolver.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlsecureresolver.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmltextreader.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmltextwriter.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xmlwriter.md delete mode 100644 docs/fundamentals/runtime-libraries/system-xml-xsl-xslcompiledtransform.md diff --git a/.openpublishing.redirection.fundamentals.json b/.openpublishing.redirection.fundamentals.json index a8f85bfb5e996..53e11f7e38ff3 100644 --- a/.openpublishing.redirection.fundamentals.json +++ b/.openpublishing.redirection.fundamentals.json @@ -24,10 +24,6 @@ "source_path_from_root": "/docs/fundamentals/code-analysis/quality-rules/ca1867.md", "redirect_url": "/dotnet/fundamentals/code-analysis/quality-rules/ca1865-ca1867" }, - { - "source_path_from_root": "/docs/fundamentals/code-analysis/quality-rules/singlefile-warnings.md", - "redirect_url": "/dotnet/core/deploying/single-file/warnings/overview" - }, { "source_path_from_root": "/docs/fundamentals/code-analysis/quality-rules/il3000.md", "redirect_url": "/dotnet/core/deploying/single-file/warnings/il3000" @@ -48,6 +44,10 @@ "source_path_from_root": "/docs/fundamentals/code-analysis/quality-rules/publish-warnings.md", "redirect_url": "/dotnet/core/deploying/single-file/warnings/overview" }, + { + "source_path_from_root": "/docs/fundamentals/code-analysis/quality-rules/singlefile-warnings.md", + "redirect_url": "/dotnet/core/deploying/single-file/warnings/overview" + }, { "source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/code-block-preferences.md", "redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/language-rules" @@ -165,40 +165,20 @@ "redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/language-rules" }, { - "source_path_from_root": "/docs/fundamentals/networking/httpclient.md", - "redirect_url": "/dotnet/fundamentals/networking/http/httpclient" - }, - { - "source_path_from_root": "/docs/standard/commandline/customize-help.md", - "redirect_url": "/dotnet/standard/commandline/how-to-customize-help" - }, - { - "source_path_from_root": "/docs/standard/commandline/define-commands.md", - "redirect_url": "/dotnet/standard/commandline/syntax#commands" - }, - { - "source_path_from_root": "/docs/standard/commandline/dependency-injection.md", - "redirect_url": "/dotnet/standard/commandline/migration-guide-2.0.0-beta5#invocation" - }, - { - "source_path_from_root": "/docs/standard/commandline/handle-termination.md", - "redirect_url": "/dotnet/standard/commandline/how-to-parse-and-invoke#process-termination-timeout" - }, - { - "source_path_from_root": "/docs/standard/commandline/model-binding.md", - "redirect_url": "/dotnet/standard/commandline/how-to-parse-and-invoke" + "source_path_from_root": "/docs/fundamentals/networking/http/http-autoclient.md", + "redirect_url": "/dotnet/fundamentals/networking/http/http-overview" }, { - "source_path_from_root": "/docs/standard/commandline/use-middleware.md", - "redirect_url": "/dotnet/standard/commandline/migration-guide-2.0.0-beta5#configuration" + "source_path_from_root": "/docs/fundamentals/networking/httpclient-guidelines.md", + "redirect_url": "/dotnet/fundamentals/networking/http/httpclient-guidelines" }, { - "source_path_from_root": "/docs/standard/commandline/tab-completion.md", - "redirect_url": "/dotnet/standard/commandline/how-to-enable-tab-completion" + "source_path_from_root": "/docs/fundamentals/networking/httpclient.md", + "redirect_url": "/dotnet/fundamentals/networking/http/httpclient" }, { - "source_path_from_root": "/docs/fundamentals/networking/httpclient-guidelines.md", - "redirect_url": "/dotnet/fundamentals/networking/http/httpclient-guidelines" + "source_path_from_root": "/docs/fundamentals/networking/networking-telemetry.md", + "redirect_url": "/dotnet/fundamentals/networking/telemetry/overview" }, { "source_path_from_root": "/docs/fundamentals/package-validation/baseline-version-validator.md", @@ -225,10 +205,6 @@ "redirect_url": "/dotnet/fundamentals/apicompat/package-validation/overview", "redirect_document_id": true }, - { - "source_path_from_root": "/docs/fundamentals/networking/networking-telemetry.md", - "redirect_url": "/dotnet/fundamentals/networking/telemetry/overview" - }, { "source_path_from_root": "/docs/fundamentals/productivity/code-analysis.md", "redirect_url": "/dotnet/fundamentals/code-analysis/overview" @@ -241,6 +217,74 @@ "source_path_from_root": "/docs/fundamentals/reflection/reflection.md", "redirect_url": "/dotnet/fundamentals/reflection/overview" }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/microsoft-win32-registry.md", + "redirect_url": "/dotnet/api/microsoft.win32.registry" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-accessviolationexception.md", + "redirect_url": "/dotnet/api/system.accessviolationexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-appcontext.md", + "redirect_url": "/dotnet/api/system.appcontext" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-appdomain-unhandledexception.md", + "redirect_url": "/dotnet/api/system.appdomain.unhandledexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-boolean.md", + "redirect_url": "/dotnet/api/system.boolean" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-byte.md", + "redirect_url": "/dotnet/api/system.byte" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-char.md", + "redirect_url": "/dotnet/api/system.char" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-collections-generic-hashset{t}.md", + "redirect_url": "/dotnet/api/system.collections.generic.hashset-1" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-collections-generic-list{t}.md", + "redirect_url": "/dotnet/api/system.collections.generic.list-1" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-collections-objectmodel-keyedcollection{tkey,titem}-changeitemkey.md", + "redirect_url": "/dotnet/api/system.collections.objectmodel.keyedcollection-2.changeitemkey" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-collections-objectmodel-observablecollection{t}.md", + "redirect_url": "/dotnet/api/system.collections.objectmodel.observablecollection-1" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-console.md", + "redirect_url": "/dotnet/api/system.console" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-convert.md", + "redirect_url": "/dotnet/api/system.convert" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-commandbehavior.md", + "redirect_url": "/dotnet/api/system.data.commandbehavior" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-datacolumn-expression.md", + "redirect_url": "/dotnet/api/system.data.datacolumn.expression" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-dataset.md", + "redirect_url": "/dotnet/api/system.data.dataset" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-datatable.md", + "redirect_url": "/dotnet/api/system.data.datatable" + }, { "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-linq-dataloadoptions.md", "redirect_url": "/dotnet/framework/data/adonet/sql/linq/" @@ -249,6 +293,618 @@ "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-linq-mapping-tableattribute.md", "redirect_url": "/dotnet/framework/data/adonet/sql/linq/" }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-datetime-tobinary.md", + "redirect_url": "/dotnet/api/system.datetime.tobinary" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-datetime-tryparse.md", + "redirect_url": "/dotnet/api/system.datetime.tryparse" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-datetime.md", + "redirect_url": "/dotnet/api/system.datetime" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-decimal.md", + "redirect_url": "/dotnet/api/system.decimal" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-delegate-createdelegate.md", + "redirect_url": "/dotnet/api/system.delegate.createdelegate" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-diagnostics-performancecountertype.md", + "redirect_url": "/dotnet/api/system.diagnostics.performancecountertype" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-diagnostics-processstartinfo-useshellexecute.md", + "redirect_url": "/dotnet/api/system.diagnostics.processstartinfo.useshellexecute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-diagnostics-tracing-eventsource.md", + "redirect_url": "/dotnet/api/system.diagnostics.tracing.eventsource" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-diagnostics-tracing-eventwritteneventargs.md", + "redirect_url": "/dotnet/api/system.diagnostics.tracing.eventwritteneventargs" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-double-compareto.md", + "redirect_url": "/dotnet/api/system.double.compareto" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-double-epsilon.md", + "redirect_url": "/dotnet/api/system.double.epsilon" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-double-equals.md", + "redirect_url": "/dotnet/api/system.double.equals" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-double.md", + "redirect_url": "/dotnet/api/system.double" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-drawing-drawing2d-matrix.md", + "redirect_url": "/dotnet/api/system.drawing.drawing2d.matrix" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-dynamic-expandoobject.md", + "redirect_url": "/dotnet/api/system.dynamic.expandoobject" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-enum.md", + "redirect_url": "/dotnet/api/system.enum" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-environment-getenvironmentvariable.md", + "redirect_url": "/dotnet/api/system.environment.getenvironmentvariable" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-exception-data.md", + "redirect_url": "/dotnet/api/system.exception.data" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-exception-message.md", + "redirect_url": "/dotnet/api/system.exception.message" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-exception.md", + "redirect_url": "/dotnet/api/system.exception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-flagsattribute.md", + "redirect_url": "/dotnet/api/system.flagsattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-gc.md", + "redirect_url": "/dotnet/api/system.gc" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-compareinfo.md", + "redirect_url": "/dotnet/api/system.globalization.compareinfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-compareoptions.md", + "redirect_url": "/dotnet/api/system.globalization.compareoptions" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder-ctor.md", + "redirect_url": "/dotnet/api/system.globalization.cultureandregioninfobuilder.ctor" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder.md", + "redirect_url": "/dotnet/api/system.globalization.cultureandregioninfobuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-currentculture.md", + "redirect_url": "/dotnet/api/system.globalization.cultureinfo.currentculture" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-currentuiculture.md", + "redirect_url": "/dotnet/api/system.globalization.cultureinfo.currentuiculture" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureinfo-invariantculture.md", + "redirect_url": "/dotnet/api/system.globalization.cultureinfo.invariantculture" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-cultureinfo.md", + "redirect_url": "/dotnet/api/system.globalization.cultureinfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-datetimeformatinfo.md", + "redirect_url": "/dotnet/api/system.globalization.datetimeformatinfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-numberformatinfo.md", + "redirect_url": "/dotnet/api/system.globalization.numberformatinfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-persiancalendar.md", + "redirect_url": "/dotnet/api/system.globalization.persiancalendar" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-regioninfo.md", + "redirect_url": "/dotnet/api/system.globalization.regioninfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-sortkey.md", + "redirect_url": "/dotnet/api/system.globalization.sortkey" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-globalization-sortversion.md", + "redirect_url": "/dotnet/api/system.globalization.sortversion" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-iasyncdisposable.md", + "redirect_url": "/dotnet/api/system.iasyncdisposable" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-idisposable.md", + "redirect_url": "/dotnet/api/system.idisposable" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-int32.md", + "redirect_url": "/dotnet/api/system.int32" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-int64.md", + "redirect_url": "/dotnet/api/system.int64" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-invalidcastexception.md", + "redirect_url": "/dotnet/api/system.invalidcastexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-invalidoperationexception.md", + "redirect_url": "/dotnet/api/system.invalidoperationexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-io-filestream.md", + "redirect_url": "/dotnet/api/system.io.filestream" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-io-filesystemwatcher.md", + "redirect_url": "/dotnet/api/system.io.filesystemwatcher" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-linq-expressions-binaryexpression.md", + "redirect_url": "/dotnet/api/system.linq.expressions.binaryexpression" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-linq-expressions-expression-add.md", + "redirect_url": "/dotnet/api/system.linq.expressions.expression.add" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-midpointrounding.md", + "redirect_url": "/dotnet/api/system.midpointrounding" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-net-ftpwebrequest-proxy.md", + "redirect_url": "/dotnet/api/system.net.ftpwebrequest.proxy" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-net-http-httpclient.md", + "redirect_url": "/dotnet/api/system.net.http.httpclient" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-net-http-httpclienthandler.md", + "redirect_url": "/dotnet/api/system.net.http.httpclienthandler" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-net-httplistener.md", + "redirect_url": "/dotnet/api/system.net.httplistener" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-net-sockets-socket.md", + "redirect_url": "/dotnet/api/system.net.sockets.socket" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-notimplementedexception.md", + "redirect_url": "/dotnet/api/system.notimplementedexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-notsupportedexception.md", + "redirect_url": "/dotnet/api/system.notsupportedexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-nullable.md", + "redirect_url": "/dotnet/api/system.nullable" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-nullable{t}.md", + "redirect_url": "/dotnet/api/system.nullable-1" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-numerics-biginteger.md", + "redirect_url": "/dotnet/api/system.numerics.biginteger" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-numerics-complex.md", + "redirect_url": "/dotnet/api/system.numerics.complex" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-object-equals.md", + "redirect_url": "/dotnet/api/system.object.equals" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-object-finalize.md", + "redirect_url": "/dotnet/api/system.object.finalize" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-object-gethashcode.md", + "redirect_url": "/dotnet/api/system.object.gethashcode" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-object-tostring.md", + "redirect_url": "/dotnet/api/system.object.tostring" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-object.md", + "redirect_url": "/dotnet/api/system.object" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-random.md", + "redirect_url": "/dotnet/api/system.random" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-context-customreflectioncontext.md", + "redirect_url": "/dotnet/api/system.reflection.context.customreflectioncontext" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder.md", + "redirect_url": "/dotnet/api/system.reflection.emit.assemblybuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicilinfo.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicilinfo" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-createdelegate.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod.createdelegate" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-ctor.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod.ctor" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-getilgenerator.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod.getilgenerator" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-invoke.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod.invoke" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod-issecuritycritical.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod.issecuritycritical" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod.md", + "redirect_url": "/dotnet/api/system.reflection.emit.dynamicmethod" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-methodbuilder.md", + "redirect_url": "/dotnet/api/system.reflection.emit.methodbuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md", + "redirect_url": "/dotnet/api/system.reflection.emit.persistedassemblybuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-emit-typebuilder.md", + "redirect_url": "/dotnet/api/system.reflection.emit.typebuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-reflection-portableexecutable-debugdirectoryentrytype.md", + "redirect_url": "/dotnet/api/system.reflection.portableexecutable.debugdirectoryentrytype" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-missingmanifestresourceexception.md", + "redirect_url": "/dotnet/api/system.resources.missingmanifestresourceexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-neutralresourceslanguageattribute.md", + "redirect_url": "/dotnet/api/system.resources.neutralresourceslanguageattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-resourcemanager-ctor.md", + "redirect_url": "/dotnet/api/system.resources.resourcemanager.ctor" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-resourcemanager-getobject.md", + "redirect_url": "/dotnet/api/system.resources.resourcemanager.getobject" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-resourcemanager-getstring.md", + "redirect_url": "/dotnet/api/system.resources.resourcemanager.getstring" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-resourcemanager.md", + "redirect_url": "/dotnet/api/system.resources.resourcemanager" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-resourcereader.md", + "redirect_url": "/dotnet/api/system.resources.resourcereader" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-resources-satellitecontractversionattribute.md", + "redirect_url": "/dotnet/api/system.resources.satellitecontractversionattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-compilerservices-internalsvisibletoattribute.md", + "redirect_url": "/dotnet/api/system.runtime.compilerservices.internalsvisibletoattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-compilerservices-runtimehelpers-gethashcode.md", + "redirect_url": "/dotnet/api/system.runtime.compilerservices.runtimehelpers.gethashcode" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-interopservices-comexception.md", + "redirect_url": "/dotnet/api/system.runtime.interopservices.comexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-interopservices-comwrappers.md", + "redirect_url": "/dotnet/api/system.runtime.interopservices.comwrappers" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-interopservices-icustommarshaler.md", + "redirect_url": "/dotnet/api/system.runtime.interopservices.icustommarshaler" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-interopservices-marshal-getactiveobject.md", + "redirect_url": "/dotnet/api/system.runtime.interopservices.marshal.getactiveobject" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-interopservices-safehandle.md", + "redirect_url": "/dotnet/api/system.runtime.interopservices.safehandle" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-loader-assemblyloadcontext.md", + "redirect_url": "/dotnet/api/system.runtime.loader.assemblyloadcontext" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-serialization-datacontractattribute.md", + "redirect_url": "/dotnet/api/system.runtime.serialization.datacontractattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-serialization-datacontractserializer.md", + "redirect_url": "/dotnet/api/system.runtime.serialization.datacontractserializer" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-serialization-iextensibledataobject.md", + "redirect_url": "/dotnet/api/system.runtime.serialization.iextensibledataobject" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-serialization-xsddatacontractexporter.md", + "redirect_url": "/dotnet/api/system.runtime.serialization.xsddatacontractexporter" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-runtime-versioning-componentguaranteesattribute.md", + "redirect_url": "/dotnet/api/system.runtime.versioning.componentguaranteesattribute" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-security-cryptography-rsacryptoserviceprovider.md", + "redirect_url": "/dotnet/api/system.security.cryptography.rsacryptoserviceprovider" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-security-cryptography-rsaparameters.md", + "redirect_url": "/dotnet/api/system.security.cryptography.rsaparameters" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-security-cryptography-xml-signedxml.md", + "redirect_url": "/dotnet/api/system.security.cryptography.xml.signedxml" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-security-securestring.md", + "redirect_url": "/dotnet/api/system.security.securestring" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-single-compareto.md", + "redirect_url": "/dotnet/api/system.single.compareto" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-single-epsilon.md", + "redirect_url": "/dotnet/api/system.single.epsilon" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-single-equals.md", + "redirect_url": "/dotnet/api/system.single.equals" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-single.md", + "redirect_url": "/dotnet/api/system.single" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-span{t}.md", + "redirect_url": "/dotnet/api/system.span-1" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-string-ctor.md", + "redirect_url": "/dotnet/api/system.string.ctor" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-string-format.md", + "redirect_url": "/dotnet/api/system.string.format" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-string-intern.md", + "redirect_url": "/dotnet/api/system.string.intern" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-string-isnullorempty.md", + "redirect_url": "/dotnet/api/system.string.isnullorempty" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-string.md", + "redirect_url": "/dotnet/api/system.string" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-stringcomparer.md", + "redirect_url": "/dotnet/api/system.stringcomparer" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-encoding-default.md", + "redirect_url": "/dotnet/api/system.text.encoding.default" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-encoding.md", + "redirect_url": "/dotnet/api/system.text.encoding" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-regularexpressions-regex-match.md", + "redirect_url": "/dotnet/api/system.text.regularexpressions.regex.match" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-regularexpressions-regex.md", + "redirect_url": "/dotnet/api/system.text.regularexpressions.regex" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-rune.md", + "redirect_url": "/dotnet/api/system.text.rune" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-text-stringbuilder.md", + "redirect_url": "/dotnet/api/system.text.stringbuilder" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-monitor-wait.md", + "redirect_url": "/dotnet/api/system.threading.monitor.wait" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-monitor.md", + "redirect_url": "/dotnet/api/system.threading.monitor" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-readerwriterlockslim.md", + "redirect_url": "/dotnet/api/system.threading.readerwriterlockslim" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-tasks-task.md", + "redirect_url": "/dotnet/api/system.threading.tasks.task" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-tasks-taskscheduler.md", + "redirect_url": "/dotnet/api/system.threading.tasks.taskscheduler" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-threading-thread.md", + "redirect_url": "/dotnet/api/system.threading.thread" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-timespan-parse.md", + "redirect_url": "/dotnet/api/system.timespan.parse" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-timespan-tryparse.md", + "redirect_url": "/dotnet/api/system.timespan.tryparse" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-timespan.md", + "redirect_url": "/dotnet/api/system.timespan" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-type-getproperty.md", + "redirect_url": "/dotnet/api/system.type.getproperty" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-type-gettype.md", + "redirect_url": "/dotnet/api/system.type.gettype" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-type-makegenerictype.md", + "redirect_url": "/dotnet/api/system.type.makegenerictype" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-type.md", + "redirect_url": "/dotnet/api/system.type" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-typeinitializationexception.md", + "redirect_url": "/dotnet/api/system.typeinitializationexception" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-uri.md", + "redirect_url": "/dotnet/api/system.uri" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-version.md", + "redirect_url": "/dotnet/api/system.version" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-linq-xname.md", + "redirect_url": "/dotnet/api/system.xml.linq.xname" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-linq-xnamespace.md", + "redirect_url": "/dotnet/api/system.xml.linq.xnamespace" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-schema-xmlschemaset.md", + "redirect_url": "/dotnet/api/system.xml.schema.xmlschemaset" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-serialization-codegenerationoptions.md", + "redirect_url": "/dotnet/api/system.xml.serialization.codegenerationoptions" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-serialization-xmlserializer.md", + "redirect_url": "/dotnet/api/system.xml.serialization.xmlserializer" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlconvert.md", + "redirect_url": "/dotnet/api/system.xml.xmlconvert" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmldocument.md", + "redirect_url": "/dotnet/api/system.xml.xmldocument" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlreader-create.md", + "redirect_url": "/dotnet/api/system.xml.xmlreader.create" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlreader.md", + "redirect_url": "/dotnet/api/system.xml.xmlreader" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings-dtdprocessing.md", + "redirect_url": "/dotnet/api/system.xml.xmlreadersettings.dtdprocessing" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings-schemas.md", + "redirect_url": "/dotnet/api/system.xml.xmlreadersettings.schemas" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlreadersettings.md", + "redirect_url": "/dotnet/api/system.xml.xmlreadersettings" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlresolver.md", + "redirect_url": "/dotnet/api/system.xml.xmlresolver" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlsecureresolver.md", + "redirect_url": "/dotnet/api/system.xml.xmlsecureresolver" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmltextreader.md", + "redirect_url": "/dotnet/api/system.xml.xmltextreader" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmltextwriter.md", + "redirect_url": "/dotnet/api/system.xml.xmltextwriter" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xmlwriter.md", + "redirect_url": "/dotnet/api/system.xml.xmlwriter" + }, + { + "source_path_from_root": "/docs/fundamentals/runtime-libraries/system-xml-xsl-xslcompiledtransform.md", + "redirect_url": "/dotnet/api/system.xml.xsl.xslcompiledtransform" + }, { "source_path_from_root": "/docs/fundamentals/syslib-diagnostics/syslib1004.md", "redirect_url": "/dotnet/fundamentals/syslib-diagnostics/source-generator-overview" @@ -594,8 +1250,32 @@ "redirect_url": "/dotnet/toc/tools-diagnostics/index" }, { - "source_path_from_root": "/docs/fundamentals/networking/http/http-autoclient.md", - "redirect_url": "/dotnet/fundamentals/networking/http/http-overview" + "source_path_from_root": "/docs/standard/commandline/customize-help.md", + "redirect_url": "/dotnet/standard/commandline/how-to-customize-help" + }, + { + "source_path_from_root": "/docs/standard/commandline/define-commands.md", + "redirect_url": "/dotnet/standard/commandline/syntax#commands" + }, + { + "source_path_from_root": "/docs/standard/commandline/dependency-injection.md", + "redirect_url": "/dotnet/standard/commandline/migration-guide-2.0.0-beta5#invocation" + }, + { + "source_path_from_root": "/docs/standard/commandline/handle-termination.md", + "redirect_url": "/dotnet/standard/commandline/how-to-parse-and-invoke#process-termination-timeout" + }, + { + "source_path_from_root": "/docs/standard/commandline/model-binding.md", + "redirect_url": "/dotnet/standard/commandline/how-to-parse-and-invoke" + }, + { + "source_path_from_root": "/docs/standard/commandline/tab-completion.md", + "redirect_url": "/dotnet/standard/commandline/how-to-enable-tab-completion" + }, + { + "source_path_from_root": "/docs/standard/commandline/use-middleware.md", + "redirect_url": "/dotnet/standard/commandline/migration-guide-2.0.0-beta5#configuration" } ] } diff --git a/docs/core/compatibility/core-libraries/8.0/complex-format.md b/docs/core/compatibility/core-libraries/8.0/complex-format.md index 7e88328b7b72c..7a0a30cf6a4c6 100644 --- a/docs/core/compatibility/core-libraries/8.0/complex-format.md +++ b/docs/core/compatibility/core-libraries/8.0/complex-format.md @@ -39,4 +39,4 @@ If you need the previous format, you can use a custom string formatting mechanis ## See also -- [Format a complex number](../../../../fundamentals/runtime-libraries/system-numerics-complex.md#format-a-complex-number) +- [Format a complex number](xref:System.Numerics.Complex#format-a-complex-number) diff --git a/docs/core/porting/net-framework-tech-unavailable.md b/docs/core/porting/net-framework-tech-unavailable.md index b07b4367e8c74..f7975f91363b2 100644 --- a/docs/core/porting/net-framework-tech-unavailable.md +++ b/docs/core/porting/net-framework-tech-unavailable.md @@ -59,9 +59,9 @@ Windows Workflow Foundation (WF) is not supported in .NET 6+. For an alternative - - -In .NET 9, a `PersistedAssemblyBuilder` was implemented and the method was added back to the reflection emit library. To learn more about how to use this API, see [System.Reflection.Emit.PersistedAssemblyBuilder class](../../fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md). +In .NET 9, a `PersistedAssemblyBuilder` was implemented and the method was added back to the reflection emit library. To learn more about how to use this API, see . -For more information about the different AssemblyBuilder implementations in .NET, see [System.Reflection.Emit.AssemblyBuilder class](../../fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder.md). +For more information about the different AssemblyBuilder implementations in .NET, see . ## Loading multi-module assemblies diff --git a/docs/core/whats-new/dotnet-9/libraries.md b/docs/core/whats-new/dotnet-9/libraries.md index fe708a44dfe34..715b643d5f793 100644 --- a/docs/core/whats-new/dotnet-9/libraries.md +++ b/docs/core/whats-new/dotnet-9/libraries.md @@ -405,7 +405,7 @@ To create a `PersistedAssemblyBuilder` instance, call its constructor and pass t :::code language="csharp" source="../snippets/dotnet-9/csharp/Reflection.cs" id="SaveAssembly"::: -The new class includes PDB support. You can emit symbol info and use it to debug a generated assembly. The API has a similar shape to the .NET Framework implementation. For more information, see [Emit symbols and generate PDB](../../../fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md#emit-symbols-and-generate-pdb). +The new class includes PDB support. You can emit symbol info and use it to debug a generated assembly. The API has a similar shape to the .NET Framework implementation. For more information, see [Emit symbols and generate PDB](xref:System.Reflection.Emit.PersistedAssemblyBuilder#emit-symbols-and-generate-pdb). ### Type-name parsing diff --git a/docs/csharp/language-reference/builtin-types/enum.md b/docs/csharp/language-reference/builtin-types/enum.md index 1d5a74b5b009b..45b0dc49dfc47 100644 --- a/docs/csharp/language-reference/builtin-types/enum.md +++ b/docs/csharp/language-reference/builtin-types/enum.md @@ -63,7 +63,7 @@ If you want an enumeration type to represent a combination of choices, define en :::code language="csharp" source="snippets/shared/EnumType.cs" id="SnippetFlags"::: -For more information and examples, see the API reference page and the [Non-exclusive members and the Flags attribute](../../../fundamentals/runtime-libraries/system-enum.md#non-exclusive-members-and-the-flags-attribute) section of the API reference page. +For more information and examples, see and [Non-exclusive members and the Flags attribute](xref:System.Enum#non-exclusive-members-and-the-flags-attribute). ## The System.Enum type and enum constraint diff --git a/docs/csharp/toc.yml b/docs/csharp/toc.yml index e943cb48281bd..d73629ec9f0f5 100644 --- a/docs/csharp/toc.yml +++ b/docs/csharp/toc.yml @@ -412,10 +412,6 @@ items: href: advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio.md - name: DebugView Syntax href: advanced-topics/expression-trees/debugview-syntax.md - - name: Supplemental API - Expression class add method - href: ../fundamentals/runtime-libraries/system-linq-expressions-expression-add.md - - name: Supplemental API - BinaryExpression class - href: ../fundamentals/runtime-libraries/system-linq-expressions-binaryexpression.md - name: Native interoperability items: - name: Overview diff --git a/docs/framework/app-domains/toc.yml b/docs/framework/app-domains/toc.yml index 80b9314f6029e..d28b02187bbc5 100644 --- a/docs/framework/app-domains/toc.yml +++ b/docs/framework/app-domains/toc.yml @@ -48,9 +48,5 @@ items: href: shadow-copy-assemblies.md - name: "How to: Receive First-Chance Exception Notifications" href: how-to-receive-first-chance-exception-notifications.md - - name: Supplemental API remarks - items: - - name: AppDomain.UnhandledException event - href: ../../fundamentals/runtime-libraries/system-appdomain-unhandledexception.md - name: Run Intranet Applications in Full Trust href: running-intranet-applications-in-full-trust.md diff --git a/docs/framework/network-programming/toc.yml b/docs/framework/network-programming/toc.yml index 8fa29f66309d9..c4e3963ae0b64 100644 --- a/docs/framework/network-programming/toc.yml +++ b/docs/framework/network-programming/toc.yml @@ -49,10 +49,6 @@ items: href: how-to-upload-files-with-ftp.md - name: List Directory Contents with FTP href: how-to-list-directory-contents-with-ftp.md - - name: Supplemental API remarks - items: - - name: FtpWebRequest.Proxy property - href: ../../fundamentals/runtime-libraries/system-net-ftpwebrequest-proxy.md - name: UDP href: using-udp-services.md - name: Security in Network Programming diff --git a/docs/fundamentals/runtime-libraries/includes/c-and-posix-cultures.md b/docs/fundamentals/runtime-libraries/includes/c-and-posix-cultures.md deleted file mode 100644 index 1f96cbf12117c..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/c-and-posix-cultures.md +++ /dev/null @@ -1,2 +0,0 @@ -> [!NOTE] -> **.NET Core running on Linux and macOS systems only:** The collation behavior for the C and Posix cultures is always case-sensitive because these cultures do not use the expected Unicode collation order. We recommend that you use a culture other than C or Posix for performing culture-sensitive, case-insensitive sorting operations. diff --git a/docs/fundamentals/runtime-libraries/includes/calendar-era.md b/docs/fundamentals/runtime-libraries/includes/calendar-era.md deleted file mode 100644 index cedfe03539359..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/calendar-era.md +++ /dev/null @@ -1,3 +0,0 @@ - -> [!IMPORTANT] -> Eras in the Japanese calendars are based on the emperor's reign and are therefore expected to change. For example, May 1, 2019 marked the beginning of the Reiwa era in the and . Such a change of era affects all applications that use these calendars. For more information and to determine whether your applications are affected, see [Handling a new era in the Japanese calendar in .NET](https://devblogs.microsoft.com/dotnet/handling-a-new-era-in-the-japanese-calendar-in-net/). For information on testing your applications on Windows systems to ensure their readiness for the era change, see [Prepare your application for the Japanese era change](/windows/uwp/design/globalizing/japanese-era-change). For features in .NET that support calendars with multiple eras and for best practices when working with calendars that support multiple eras, see [Working with eras](../../../standard/datetime/working-with-calendars.md#work-with-eras). diff --git a/docs/fundamentals/runtime-libraries/includes/context.md b/docs/fundamentals/runtime-libraries/includes/context.md deleted file mode 100644 index 48e7573b5ca2e..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/context.md +++ /dev/null @@ -1,2 +0,0 @@ -> [!NOTE] -> This article provides supplementary remarks to the reference documentation for this API. diff --git a/docs/fundamentals/runtime-libraries/includes/interpolated-strings.md b/docs/fundamentals/runtime-libraries/includes/interpolated-strings.md deleted file mode 100644 index b5ec035942008..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/interpolated-strings.md +++ /dev/null @@ -1,2 +0,0 @@ -> [!IMPORTANT] -> Instead of calling the **String.Format** method or using [composite format strings](../../../standard/base-types/composite-formatting.md), you can use *interpolated strings* if your language supports them. An interpolated string is a string that contains *interpolated expressions*. Each interpolated expression is resolved with the expression's value and included in the result string when the string is assigned. For more information, see [String interpolation (C# Reference)](../../../csharp/language-reference/tokens/interpolated.md) and [Interpolated strings (Visual Basic Reference)](../../../visual-basic/programming-guide/language-features/strings/interpolated-strings.md). diff --git a/docs/fundamentals/runtime-libraries/includes/stringbuilder-perf-note.md b/docs/fundamentals/runtime-libraries/includes/stringbuilder-perf-note.md deleted file mode 100644 index 776d65f66985e..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/stringbuilder-perf-note.md +++ /dev/null @@ -1,27 +0,0 @@ -Using character-based indexing with the property can be extremely slow under the following conditions: - -- The instance is large (for example, it consists of several tens of thousands of characters). -- The is "chunky." That is, repeated calls to methods such as have automatically expanded the object's property and allocated new chunks of memory to it. - -Performance is severely impacted because each character access walks the entire linked list of chunks to find the correct buffer to index into. - -> [!NOTE] -> Even for a large "chunky" object, using the property for index-based access to one or a small number of characters has a negligible performance impact; typically, it is an **O(n)** operation. The significant performance impact occurs when iterating the characters in the object, which is an **O(n^2)** operation. - -If you encounter performance issues when using character-based indexing with objects, you can use any of the following workarounds: - -- Convert the instance to a by calling the method, then access the characters in the string. - -- Copy the contents of the existing object to a new pre-sized object. Performance improves because the new object is not chunky. For example: - - ```csharp - // sbOriginal is the existing StringBuilder object - var sbNew = new StringBuilder(sbOriginal.ToString(), sbOriginal.Length); - ``` - - ```vb - ' sbOriginal is the existing StringBuilder object - Dim sbNew = New StringBuilder(sbOriginal.ToString(), sbOriginal.Length) - ``` - -- Set the initial capacity of the object to a value that is approximately equal to its maximum expected size by calling the constructor. Note that this allocates the entire block of memory even if the rarely reaches its maximum capacity. diff --git a/docs/fundamentals/runtime-libraries/includes/system-drawing-common.md b/docs/fundamentals/runtime-libraries/includes/system-drawing-common.md deleted file mode 100644 index 40e5838c17578..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/system-drawing-common.md +++ /dev/null @@ -1,2 +0,0 @@ -> [!NOTE] -> In .NET 6 and later versions, the [System.Drawing.Common package](https://www.nuget.org/packages/System.Drawing.Common/), which includes this type, is only supported on Windows operating systems. Use of this type in cross-platform apps causes compile-time warnings and runtime exceptions. For more information, see [System.Drawing.Common only supported on Windows](../../../core/compatibility/core-libraries/6.0/system-drawing-common-windows-only.md). diff --git a/docs/fundamentals/runtime-libraries/includes/unicode-categories.md b/docs/fundamentals/runtime-libraries/includes/unicode-categories.md deleted file mode 100644 index 678e1ca7bc000..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/unicode-categories.md +++ /dev/null @@ -1,19 +0,0 @@ -.NET maintains its own table of characters and their corresponding categories, which ensures that a specific version of a .NET implementation running on different platforms returns identical character category information. On all .NET versions and across all OS platforms, character category information is provided by the [Unicode Character Database](https://www.unicode.org/ucd/). - -The following table lists .NET versions and the versions of the Unicode Standard on which their character categories are based. - -|.NET version|Version of the Unicode Standard| -|----------------------------|-------------------------------------| -|.NET Framework 1.1|[The Unicode Standard, Version 4.0.0](https://www.unicode.org/versions/Unicode4.0.0/)| -|.NET Framework 2.0|[The Unicode Standard, Version 5.0.0](https://www.unicode.org/versions/Unicode5.0.0)| -|.NET Framework 3.5|[The Unicode Standard, Version 5.0.0](https://www.unicode.org/versions/Unicode5.0.0)| -|.NET Framework 4|[The Unicode Standard, Version 5.0.0](https://www.unicode.org/versions/Unicode5.0.0)| -|.NET Framework 4.5|[The Unicode Standard, Version 6.3.0](https://www.unicode.org/versions/Unicode6.3.0/)| -|.NET Framework 4.5.1|[The Unicode Standard, Version 6.3.0](https://www.unicode.org/versions/Unicode6.3.0/)| -|.NET Framework 4.5.2|[The Unicode Standard, Version 6.3.0](https://www.unicode.org/versions/Unicode6.3.0/)| -|.NET Framework 4.6|[The Unicode Standard, Version 6.3.0](https://www.unicode.org/versions/Unicode6.3.0/)| -|.NET Framework 4.6.1|[The Unicode Standard, Version 6.3.0](https://www.unicode.org/versions/Unicode6.3.0/)| -|.NET Framework 4.6.2 and later versions|[The Unicode Standard, Version 8.0.0](https://www.unicode.org/versions/Unicode8.0.0/)| -|.NET Core 2.1|[The Unicode Standard, Version 8.0.0](https://www.unicode.org/versions/Unicode8.0.0/)| -|.NET Core 3.1|[The Unicode Standard, Version 11.0.0](https://www.unicode.org/versions/Unicode11.0.0/)| -|.NET 5|[The Unicode Standard, Version 13.0.0](https://www.unicode.org/versions/Unicode13.0.0/)| diff --git a/docs/fundamentals/runtime-libraries/includes/untrusted-data-class-note.md b/docs/fundamentals/runtime-libraries/includes/untrusted-data-class-note.md deleted file mode 100644 index 334a62cba7b43..0000000000000 --- a/docs/fundamentals/runtime-libraries/includes/untrusted-data-class-note.md +++ /dev/null @@ -1,2 +0,0 @@ -> [!IMPORTANT] -> Calling methods from this class with untrusted data is a security risk. Call the methods from this class only with trusted data. For more information, see [Validate All Inputs](https://owasp.org/www-project-proactive-controls/v3/en/c5-validate-inputs). diff --git a/docs/fundamentals/runtime-libraries/media/gdip-art10.gif b/docs/fundamentals/runtime-libraries/media/gdip-art10.gif deleted file mode 100644 index 5853ca9cbb364ac62f0599c29366ea1feb762b51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1121 zcmV-n1fKgxNk%w1VetTn0D%7h|Ns90001li0002-0Ehqp0{?`MsmtvTqnsevi!I%} zdzFR3N0#OZqUy>rV++UXE7!I}-}=7f{BQFChcY4YcrqfFB_;DYaYCmNDfODLVz&n^ zm+Jjq!(t}6{5+$H>h-bh=E38?IX!q6+w-wKzX&0MAd)dicwu;$qp0Ke2csp}rMO6$ zcz7Ao_=pv$Imrl$DN2}Gc;m>q;+a~vsXE09+cyg(Tg%dl`*FLAqU+1i8{9<9W~_l~ zJOm8Z?6M5>Y&)G2Er(p4b&dUiNSBPq{p#>7JZBePqdh(ts2*himyS-x-Y);%wn$-q z-ti*LJ$%D(xZ6Na*gmc2*tpDO51TJbX5{me8&00vh_1>;&S(;(%9Q@<5foC!sL_mIc%<_v z%8*I*QThrttk^qQXV5f*73!xrWuI9JWT&1LjFO*W#4NYgt&A5YILC(WC?1VX6BjXrA;t7CV1-{3Mf{v z>M3h+n!>nZcvt#Jl&h1TCoB@hvZbSR$N#zkEKkewmF#oRqS34~tQJ{qEVs5At#!o! zlumx6b}P~zP)-shgqwy4Vz~CnC+@F{ZJA+8@7CMjxNx3ph)lJfmu`jf?z@+I^6|?r zq6FV*ur=D4D^|p5MrdwK{?_D&63L;pFt`ajIpW1F1*Dr?CVK{(ZmltvMO`P4W~^GD zear@WxP=y3N1ws<8)T}XOWMD)!pU-Whdp+gWk=Jiv^%aXowUMYRx+(CKI10Y%vU=d z;9;@-#bdT3K@HeyNAK)g(>@oLGSVDVc^%m+=d3i!g3TZk*+o;kOf n>boxMu#4V0wzO7l`R%piI(zS~$4ucZe|NdW*mvSK}T diff --git a/docs/fundamentals/runtime-libraries/media/gdip-art12.gif b/docs/fundamentals/runtime-libraries/media/gdip-art12.gif deleted file mode 100644 index 140c14f3ccae5c999a4c74d9b68c696efb6bc834..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1112 zcmV-e1gHB)Nk%w1VJHDu0FeLy00030|NsC0{{R30A^8LW00062EC2ui04M=i00092 zjE||y?GK}zwAzca-n{z{hT=$;=82~2%C_zc$MQ_q_KoNI&iDQg3<`(DqVb3<0hUZA zstE;DqD~UEI=M=%T2J?+-D1Qxa>N`%Kh!U_#SMc)aLfSX9$ z7)z(S0P1Q-Y@6E}XnFgqd~DhbCl=kj`@F~8>l`2_oSdDDy*-`ASDI39(MFOR2X7m? zsW9Szd)Mk-R)6iz0DM?)9lmj+78bl1a*J+t9ajycmTcRYT~!9l+*Ir~(4pB*9Rsec z>dj%(GSzu`ow;SNSx1}=uJ-8*?Z&Euy;iW4dLiw({e6!3ZrQ$v>xPPYGj6J$gH{&` z{QAJ@v7y->$vyZ(o0vP7)*c@Fa?wPeQg6RAJ$&`+J<2~n{yY2mE{oUySBQmjH1TJj zZw|R99&-m0h}?2eXcgdd@8NfxcKtcUAb182MIUtWZ75)OkYTmpg(6Cq)f%L6$k~b| zru9--=1~Y^Ytfar;*3}6cj9D<`6w9+l=b!FVAjnQS3d!;>jw6uf~|*c5}j-s#TYg8mq3eGD>5Cl=7PEZMV{zrmLj?5(})JzlKW7q_{R~ z?6A|i37xdaX6PZDs8TzVx4kACnz+SA>ZiHjj&ezqc@(LnrioeR_Hr+Ybjq}_? zL}B;XW=EU%tz^FaNZ^A1@L=D|cI@)srrvA@;W7uS!>&CkSPn$wbfdlYoo71^cIcvy ePI~F4pN@L!s;|y^>#n~Jd+f5$PP@?s00291`!Xm1 diff --git a/docs/fundamentals/runtime-libraries/microsoft-win32-registry.md b/docs/fundamentals/runtime-libraries/microsoft-win32-registry.md deleted file mode 100644 index 8731a2a88ae6d..0000000000000 --- a/docs/fundamentals/runtime-libraries/microsoft-win32-registry.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Microsoft.Win32.Registry class -description: Learn about the Microsoft.Win32.Registry class. -ms.date: 12/31/2023 ---- -# The Microsoft.Win32.Registry class - -[!INCLUDE [context](includes/context.md)] - -The class provides the set of standard root keys found in the registry on machines running Windows. The registry is a storage facility for information about applications, users, and default system settings. Applications can use the registry for storing information that needs to be preserved after the application is closed, and access that same information when the application is reloaded. For example, you can store color preferences, screen locations, or the size of a window. You can control this data for each user by storing the information in a different location in the registry. - -The base, or root, instances that are exposed by the `Registry` class delineate the basic storage mechanism for subkeys and values in the registry. All keys are read-only because the registry depends on their existence. The keys exposed by `Registry` are: - -| Key | Description | -|-------------------------------------------------|--------------------------------------------------------------------| -| | Stores information about user preferences. | -| | Stores configuration information for the local machine. | -| | Stores information about types (and classes) and their properties. | -| | Stores information about the default user configuration. | -| | Stores performance information for software components. | -| | Stores non-user-specific hardware information. | -| | Stores dynamic data. | - -Once you've identified the root key under which you want to store/retrieve information from the registry, you can use the class to add or remove subkeys and manipulate the values for a given key. - -Hardware devices can place information in the registry automatically using the Plug and Play interface. Software for installing device drivers can place information in the registry by writing to standard APIs. - -## Static methods for getting and setting values - -The class also contains `static` and methods for setting and retrieving values from registry keys. These methods open and close registry keys each time they're used. So when you access a large number of values, they don't perform as well as analogous methods in the class. - -The class also provides methods that allow you to: - -- Set Windows access control security for registry keys. -- Test the data type of a value before retrieving it. -- Delete keys. diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/module1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/module1.vb deleted file mode 100644 index 155af7209feec..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/module1.vb +++ /dev/null @@ -1,183 +0,0 @@ -' - -' Simple business object. A PartId is used to identify the type of part -' but the part name can change. -Public Class Part - Implements IEquatable(Of Part) - Public Property PartName() As String - Get - Return m_PartName - End Get - Set(value As String) - m_PartName = value - End Set - End Property - Private m_PartName As String - - Public Property PartId() As Integer - Get - Return m_PartId - End Get - Set(value As Integer) - m_PartId = value - End Set - End Property - Private m_PartId As Integer - - Public Overrides Function ToString() As String - Return "ID: " & PartId & " Name: " & PartName - End Function - Public Overrides Function Equals(obj As Object) As Boolean - If obj Is Nothing Then - Return False - End If - Dim objAsPart As Part = TryCast(obj, Part) - If objAsPart Is Nothing Then - Return False - Else - Return Equals(objAsPart) - End If - End Function - Public Overrides Function GetHashCode() As Integer - Return PartId - End Function - Public Overloads Function Equals(other As Part) As Boolean _ - Implements IEquatable(Of Part).Equals - If other Is Nothing Then - Return False - End If - Return (Me.PartId.Equals(other.PartId)) - End Function - ' Should also override == and != operators. - -End Class -Public Class Example - Public Shared Sub Main() - ' Create a list of parts. - Dim parts As New List(Of Part)() - - ' Add parts to the list. - parts.Add(New Part() With { - .PartName = "crank arm", - .PartId = 1234 - }) - parts.Add(New Part() With { - .PartName = "chain ring", - .PartId = 1334 - }) - parts.Add(New Part() With { - .PartName = "regular seat", - .PartId = 1434 - }) - parts.Add(New Part() With { - .PartName = "banana seat", - .PartId = 1444 - }) - parts.Add(New Part() With { - .PartName = "cassette", - .PartId = 1534 - }) - parts.Add(New Part() With { - .PartName = "shift lever", - .PartId = 1634 - }) - - - - ' Write out the parts in the list. This will call the overridden ToString method - ' in the Part class. - Console.WriteLine() - For Each aPart As Part In parts - Console.WriteLine(aPart) - Next - - - ' Check the list for part #1734. This calls the IEquatable.Equals method - ' of the Part class, which checks the PartId for equality. - Console.WriteLine(vbLf & "Contains(""1734""): {0}", parts.Contains(New Part() With { - .PartId = 1734, - .PartName = "" - })) - - ' Insert a new item at position 2. - Console.WriteLine(vbLf & "Insert(2, ""1834"")") - parts.Insert(2, New Part() With { - .PartName = "brake lever", - .PartId = 1834 - }) - - - 'Console.WriteLine(); - For Each aPart As Part In parts - Console.WriteLine(aPart) - Next - - Console.WriteLine(vbLf & "Parts[3]: {0}", parts(3)) - - Console.WriteLine(vbLf & "Remove(""1534"")") - - ' This will remove part 1534 even though the PartName is different, - ' because the Equals method only checks PartId for equality. - parts.Remove(New Part() With { - .PartId = 1534, - .PartName = "cogs" - }) - - Console.WriteLine() - For Each aPart As Part In parts - Console.WriteLine(aPart) - Next - - Console.WriteLine(vbLf & "RemoveAt(3)") - ' This will remove part at index 3. - parts.RemoveAt(3) - - Console.WriteLine() - For Each aPart As Part In parts - Console.WriteLine(aPart) - Next - End Sub - ' - ' This example code produces the following output: - ' ID: 1234 Name: crank arm - ' ID: 1334 Name: chain ring - ' ID: 1434 Name: regular seat - ' ID: 1444 Name: banana seat - ' ID: 1534 Name: cassette - ' ID: 1634 Name: shift lever - ' - ' Contains("1734"): False - ' - ' Insert(2, "1834") - ' ID: 1234 Name: crank arm - ' ID: 1334 Name: chain ring - ' ID: 1834 Name: brake lever - ' ID: 1434 Name: regular seat - ' ID: 1444 Name: banana seat - ' ID: 1534 Name: cassette - ' ID: 1634 Name: shift lever - ' - ' Parts[3]: ID: 1434 Name: regular seat - ' - ' Remove("1534") - ' - ' ID: 1234 Name: crank arm - ' ID: 1334 Name: chain ring - ' ID: 1834 Name: brake lever - ' ID: 1434 Name: regular seat - ' ID: 1444 Name: banana seat - ' ID: 1634 Name: shift lever - ' ' - ' RemoveAt(3) - ' - ' ID: 1234 Name: crank arm - ' ID: 1334 Name: chain ring - ' ID: 1834 Name: brake lever - ' ID: 1444 Name: banana seat - ' ID: 1634 Name: shift lever - ' - -End Class -' - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/source.vb b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/source.vb deleted file mode 100644 index 99fd775472da2..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/List/Overview/vb/source.vb +++ /dev/null @@ -1,100 +0,0 @@ -' -Public Class Example2 - - Public Shared Sub Main() - ' - Dim dinosaurs As New List(Of String) - - Console.WriteLine(vbLf & "Capacity: {0}", dinosaurs.Capacity) - - dinosaurs.Add("Tyrannosaurus") - dinosaurs.Add("Amargasaurus") - dinosaurs.Add("Mamenchisaurus") - dinosaurs.Add("Deinonychus") - dinosaurs.Add("Compsognathus") - ' - - Console.WriteLine() - For Each dinosaur As String In dinosaurs - Console.WriteLine(dinosaur) - Next - - Console.WriteLine(vbLf & "Capacity: {0}", dinosaurs.Capacity) - Console.WriteLine("Count: {0}", dinosaurs.Count) - - Console.WriteLine(vbLf & "Contains(""Deinonychus""): {0}", - dinosaurs.Contains("Deinonychus")) - - Console.WriteLine(vbLf & "Insert(2, ""Compsognathus"")") - dinosaurs.Insert(2, "Compsognathus") - - Console.WriteLine() - For Each dinosaur As String In dinosaurs - Console.WriteLine(dinosaur) - Next - ' - ' Shows how to access the list using the Item property. - Console.WriteLine(vbLf & "dinosaurs(3): {0}", dinosaurs(3)) - ' - Console.WriteLine(vbLf & "Remove(""Compsognathus"")") - dinosaurs.Remove("Compsognathus") - - Console.WriteLine() - For Each dinosaur As String In dinosaurs - Console.WriteLine(dinosaur) - Next - - dinosaurs.TrimExcess() - Console.WriteLine(vbLf & "TrimExcess()") - Console.WriteLine("Capacity: {0}", dinosaurs.Capacity) - Console.WriteLine("Count: {0}", dinosaurs.Count) - - dinosaurs.Clear() - Console.WriteLine(vbLf & "Clear()") - Console.WriteLine("Capacity: {0}", dinosaurs.Capacity) - Console.WriteLine("Count: {0}", dinosaurs.Count) - End Sub -End Class - -' This code example produces the following output: -' -'Capacity: 0 -' -'Tyrannosaurus -'Amargasaurus -'Mamenchisaurus -'Deinonychus -'Compsognathus -' -'Capacity: 8 -'Count: 5 -' -'Contains("Deinonychus"): True -' -'Insert(2, "Compsognathus") -' -'Tyrannosaurus -'Amargasaurus -'Compsognathus -'Mamenchisaurus -'Deinonychus -'Compsognathus -' -'dinosaurs(3): Mamenchisaurus -' -'Remove("Compsognathus") -' -'Tyrannosaurus -'Amargasaurus -'Mamenchisaurus -'Deinonychus -'Compsognathus -' -'TrimExcess() -'Capacity: 5 -'Count: 5 -' -'Clear() -'Capacity: 5 -'Count: 0 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/program.cs b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/program.cs deleted file mode 100644 index b6fd5ec5718b4..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/program.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -using System; -using System.Collections.Generic; - -// Simple business object. A PartId is used to identify the type of part -// but the part name can change. -public class Part : IEquatable -{ - public string PartName { get; set; } - - public int PartId { get; set; } - - public override string ToString() - { - return "ID: " + PartId + " Name: " + PartName; - } - public override bool Equals(object obj) - { - if (obj == null) return false; - Part objAsPart = obj as Part; - if (objAsPart == null) return false; - else return Equals(objAsPart); - } - public override int GetHashCode() - { - return PartId; - } - public bool Equals(Part other) - { - if (other == null) return false; - return (this.PartId.Equals(other.PartId)); - } - // Should also override == and != operators. -} - -public class Example -{ - public static void Main() - { - // Create a list of parts. - List parts = - [ - // Add parts to the list. - new Part() { PartName = "crank arm", PartId = 1234 }, - new Part() { PartName = "chain ring", PartId = 1334 }, - new Part() { PartName = "regular seat", PartId = 1434 }, - new Part() { PartName = "banana seat", PartId = 1444 }, - new Part() { PartName = "cassette", PartId = 1534 }, - new Part() { PartName = "shift lever", PartId = 1634 }, - ]; - - // Write out the parts in the list. This will call the overridden ToString method - // in the Part class. - Console.WriteLine(); - foreach (Part aPart in parts) - { - Console.WriteLine(aPart); - } - - // Check the list for part #1734. This calls the IEquatable.Equals method - // of the Part class, which checks the PartId for equality. - Console.WriteLine($""" - Contains("1734"): {parts.Contains(new Part { PartId = 1734, PartName = "" })} - """); - - // Insert a new item at position 2. - Console.WriteLine("\nInsert(2, \"1834\")"); - parts.Insert(2, new Part() { PartName = "brake lever", PartId = 1834 }); - - //Console.WriteLine(); - foreach (Part aPart in parts) - { - Console.WriteLine(aPart); - } - - Console.WriteLine($"\nParts[3]: {parts[3]}"); - - Console.WriteLine("\nRemove(\"1534\")"); - - // This will remove part 1534 even though the PartName is different, - // because the Equals method only checks PartId for equality. - parts.Remove(new Part() { PartId = 1534, PartName = "cogs" }); - - Console.WriteLine(); - foreach (Part aPart in parts) - { - Console.WriteLine(aPart); - } - Console.WriteLine("\nRemoveAt(3)"); - // This will remove the part at index 3. - parts.RemoveAt(3); - - Console.WriteLine(); - foreach (Part aPart in parts) - { - Console.WriteLine(aPart); - } - - /* - - ID: 1234 Name: crank arm - ID: 1334 Name: chain ring - ID: 1434 Name: regular seat - ID: 1444 Name: banana seat - ID: 1534 Name: cassette - ID: 1634 Name: shift lever - - Contains("1734"): False - - Insert(2, "1834") - ID: 1234 Name: crank arm - ID: 1334 Name: chain ring - ID: 1834 Name: brake lever - ID: 1434 Name: regular seat - ID: 1444 Name: banana seat - ID: 1534 Name: cassette - ID: 1634 Name: shift lever - - Parts[3]: ID: 1434 Name: regular seat - - Remove("1534") - - ID: 1234 Name: crank arm - ID: 1334 Name: chain ring - ID: 1834 Name: brake lever - ID: 1434 Name: regular seat - ID: 1444 Name: banana seat - ID: 1634 Name: shift lever - - RemoveAt(3) - - ID: 1234 Name: crank arm - ID: 1334 Name: chain ring - ID: 1834 Name: brake lever - ID: 1444 Name: banana seat - ID: 1634 Name: shift lever - - - */ - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/source.cs b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/source.cs deleted file mode 100644 index 412fe738ae214..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/csharp/source.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Collections.Generic; - -public class Example2 -{ - public static void Main() - { - // - // - List dinosaurs = new List(); - - Console.WriteLine($"\nCapacity: {dinosaurs.Capacity}"); - - dinosaurs.Add("Tyrannosaurus"); - dinosaurs.Add("Amargasaurus"); - dinosaurs.Add("Mamenchisaurus"); - dinosaurs.Add("Deinonychus"); - dinosaurs.Add("Compsognathus"); - // - Console.WriteLine(); - foreach (string dinosaur in dinosaurs) - { - Console.WriteLine(dinosaur); - } - - Console.WriteLine($"\nCapacity: {dinosaurs.Capacity}"); - Console.WriteLine($"Count: {dinosaurs.Count}"); - - Console.WriteLine($"""\nContains("Deinonychus"): {dinosaurs.Contains("Deinonychus")}"""); - - Console.WriteLine("\nInsert(2, \"Compsognathus\")"); - dinosaurs.Insert(2, "Compsognathus"); - - Console.WriteLine(); - foreach (string dinosaur in dinosaurs) - { - Console.WriteLine(dinosaur); - } - - // - // Shows accessing the list using the Item property. - Console.WriteLine($"\ndinosaurs[3]: {dinosaurs[3]}"); - // - - Console.WriteLine("\nRemove(\"Compsognathus\")"); - dinosaurs.Remove("Compsognathus"); - - Console.WriteLine(); - foreach (string dinosaur in dinosaurs) - { - Console.WriteLine(dinosaur); - } - - dinosaurs.TrimExcess(); - Console.WriteLine("\nTrimExcess()"); - Console.WriteLine($"Capacity: {dinosaurs.Capacity}"); - Console.WriteLine($"Count: {dinosaurs.Count}"); - - dinosaurs.Clear(); - Console.WriteLine("\nClear()"); - Console.WriteLine($"Capacity: {dinosaurs.Capacity}"); - Console.WriteLine($"Count: {dinosaurs.Count}"); - - /* This code example produces the following output: - - Capacity: 0 - - Tyrannosaurus - Amargasaurus - Mamenchisaurus - Deinonychus - Compsognathus - - Capacity: 8 - Count: 5 - - Contains("Deinonychus"): True - - Insert(2, "Compsognathus") - - Tyrannosaurus - Amargasaurus - Compsognathus - Mamenchisaurus - Deinonychus - Compsognathus - - dinosaurs[3]: Mamenchisaurus - - Remove("Compsognathus") - - Tyrannosaurus - Amargasaurus - Mamenchisaurus - Deinonychus - Compsognathus - - TrimExcess() - Capacity: 5 - Count: 5 - - Clear() - Capacity: 5 - Count: 0 - */ - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/addremoveinsert.fs b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/addremoveinsert.fs deleted file mode 100644 index 2909b9f54a6c3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/addremoveinsert.fs +++ /dev/null @@ -1,66 +0,0 @@ -// - -// Simple business object. A PartId is used to identify the type of part -// but the part name can change. -[] -type Part = { PartId : int ; mutable PartName : string } with - override this.GetHashCode() = hash this.PartId - override this.Equals(other) = - match other with - | :? Part as p -> this.PartId = p.PartId - | _ -> false - override this.ToString() = sprintf "ID: %i Name: %s" this.PartId this.PartName - -[] -let main argv = - // We refer to System.Collections.Generic.List<'T> by its type - // abbreviation ResizeArray<'T> to avoid conflicts with the F# List module. - // Note: In F# code, F# linked lists are usually preferred over - // ResizeArray<'T> when an extendable collection is required. - let parts = ResizeArray<_>() - parts.Add({PartName = "crank arm" ; PartId = 1234}) - parts.Add({PartName = "chain ring"; PartId = 1334 }) - parts.Add({PartName = "regular seat"; PartId = 1434 }) - parts.Add({PartName = "banana seat"; PartId = 1444 }) - parts.Add({PartName = "cassette"; PartId = 1534 }) - parts.Add({PartName = "shift lever"; PartId = 1634 }) - - // Write out the parts in the ResizeArray. This will call the overridden ToString method - // in the Part type - printfn "" - parts |> Seq.iter (fun p -> printfn "%O" p) - - // Check the ResizeArray for part #1734. This calls the IEquatable.Equals method - // of the Part type, which checks the PartId for equality. - printfn "\nContains(\"1734\"): %b" (parts.Contains({PartId=1734; PartName=""})) - - // Insert a new item at position 2. - printfn "\nInsert(2, \"1834\")" - parts.Insert(2, { PartName = "brake lever"; PartId = 1834 }) - - // Write out all parts - parts |> Seq.iter (fun p -> printfn "%O" p) - - printfn "\nParts[3]: %O" parts.[3] - - printfn "\nRemove(\"1534\")" - // This will remove part 1534 even though the PartName is different, - // because the Equals method only checks PartId for equality. - // Since Remove returns true or false, we need to ignore the result - parts.Remove({PartId=1534; PartName="cogs"}) |> ignore - - // Write out all parts - printfn "" - parts |> Seq.iter (fun p -> printfn "%O" p) - - printfn "\nRemoveAt(3)" - // This will remove the part at index 3. - parts.RemoveAt(3) - - // Write out all parts - printfn "" - parts |> Seq.iter (fun p -> printfn "%O" p) - - 0 // return an integer exit code - -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/listclass.fs b/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/listclass.fs deleted file mode 100644 index 7a462508dac72..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Collections.Generic/ListT/Overview/fsharp/listclass.fs +++ /dev/null @@ -1,100 +0,0 @@ -// - -[] -let main argv = - // We refer to System.Collections.Generic.List<'T> by its type - // abbreviation ResizeArray<'T> to avoid conflict with the List module. - // Note: In F# code, F# linked lists are usually preferred over - // ResizeArray<'T> when an extendable collection is required. - let dinosaurs = ResizeArray<_>() - - // Write out the dinosaurs in the ResizeArray. - let printDinosaurs() = - printfn "" - dinosaurs |> Seq.iter (fun p -> printfn "%O" p) - - - printfn "\nCapacity: %i" dinosaurs.Capacity - - dinosaurs.Add("Tyrannosaurus") - dinosaurs.Add("Amargasaurus") - dinosaurs.Add("Mamenchisaurus") - dinosaurs.Add("Deinonychus") - dinosaurs.Add("Compsognathus") - - printDinosaurs() - - printfn "\nCapacity: %i" dinosaurs.Capacity - printfn "Count: %i" dinosaurs.Count - - printfn "\nContains(\"Deinonychus\"): %b" (dinosaurs.Contains("Deinonychus")) - - printfn "\nInsert(2, \"Compsognathus\")" - dinosaurs.Insert(2, "Compsognathus") - - printDinosaurs() - - // Shows accessing the list using the Item property. - printfn "\ndinosaurs[3]: %s" dinosaurs.[3] - - printfn "\nRemove(\"Compsognathus\")" - dinosaurs.Remove("Compsognathus") |> ignore - - printDinosaurs() - - dinosaurs.TrimExcess() - printfn "\nTrimExcess()" - printfn "Capacity: %i" dinosaurs.Capacity - printfn "Count: %i" dinosaurs.Count - - dinosaurs.Clear() - printfn "\nClear()" - printfn "Capacity: %i" dinosaurs.Capacity - printfn "Count: %i" dinosaurs.Count - - 0 // return an integer exit code - - (* This code example produces the following output: - -Capacity: 0 - -Tyrannosaurus -Amargasaurus -Mamenchisaurus -Deinonychus -Compsognathus - -Capacity: 8 -Count: 5 - -Contains("Deinonychus"): true - -Insert(2, "Compsognathus") - -Tyrannosaurus -Amargasaurus -Compsognathus -Mamenchisaurus -Deinonychus -Compsognathus - -dinosaurs[3]: Mamenchisaurus - -Remove("Compsognathus") - -Tyrannosaurus -Amargasaurus -Mamenchisaurus -Deinonychus -Compsognathus - -TrimExcess() -Capacity: 5 -Count: 5 - -Clear() -Capacity: 5 -Count: 0 - *) - -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/project.csproj deleted file mode 100644 index 9aedb06e7240e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Library - net4.8 - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/source.cs b/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/source.cs deleted file mode 100644 index 3335a193e9557..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/cs/source.cs +++ /dev/null @@ -1,167 +0,0 @@ -// -using System; -using System.Data; - -class Program -{ - static void Main(string[] args) - { - // Create two tables and add them into the DataSet - DataTable orderTable = CreateOrderTable(); - DataTable orderDetailTable = CreateOrderDetailTable(); - DataSet salesSet = new DataSet(); - salesSet.Tables.Add(orderTable); - salesSet.Tables.Add(orderDetailTable); - - // Set the relations between the tables and create the related constraint. - salesSet.Relations.Add("OrderOrderDetail", orderTable.Columns["OrderId"], orderDetailTable.Columns["OrderId"], true); - - Console.WriteLine("After creating the foreign key constriant, you will see the following error if inserting order detail with the wrong OrderId: "); - try - { - DataRow errorRow = orderDetailTable.NewRow(); - errorRow[0] = 1; - errorRow[1] = "O0007"; - orderDetailTable.Rows.Add(errorRow); - } - catch (Exception e) - { - Console.WriteLine(e.Message); - } - Console.WriteLine(); - - // Insert the rows into the table - InsertOrders(orderTable); - InsertOrderDetails(orderDetailTable); - - Console.WriteLine("The initial Order table."); - ShowTable(orderTable); - - Console.WriteLine("The OrderDetail table."); - ShowTable(orderDetailTable); - - // Use the Aggregate-Sum on the child table column to get the result. - DataColumn colSub = new DataColumn("SubTotal", typeof(Decimal), "Sum(Child.LineTotal)"); - orderTable.Columns.Add(colSub); - - // Compute the tax by referencing the SubTotal expression column. - DataColumn colTax = new DataColumn("Tax", typeof(Decimal), "SubTotal*0.1"); - orderTable.Columns.Add(colTax); - - // If the OrderId is 'Total', compute the due on all orders; or compute the due on this order. - DataColumn colTotal = new DataColumn("TotalDue", typeof(Decimal), "IIF(OrderId='Total',Sum(SubTotal)+Sum(Tax),SubTotal+Tax)"); - orderTable.Columns.Add(colTotal); - - DataRow row = orderTable.NewRow(); - row["OrderId"] = "Total"; - orderTable.Rows.Add(row); - - Console.WriteLine("The Order table with the expression columns."); - ShowTable(orderTable); - - Console.WriteLine("Press any key to exit....."); - Console.ReadKey(); - } - - private static DataTable CreateOrderTable() - { - DataTable orderTable = new DataTable("Order"); - - // Define one column. - DataColumn colId = new DataColumn("OrderId", typeof(String)); - orderTable.Columns.Add(colId); - - DataColumn colDate = new DataColumn("OrderDate", typeof(DateTime)); - orderTable.Columns.Add(colDate); - - // Set the OrderId column as the primary key. - orderTable.PrimaryKey = new DataColumn[] { colId }; - - return orderTable; - } - - private static DataTable CreateOrderDetailTable() - { - DataTable orderDetailTable = new DataTable("OrderDetail"); - - // Define all the columns once. - DataColumn[] cols = - { - new DataColumn("OrderDetailId", typeof(Int32)), - new DataColumn("OrderId", typeof(String)), - new DataColumn("Product", typeof(String)), - new DataColumn("UnitPrice", typeof(Decimal)), - new DataColumn("OrderQty", typeof(Int32)), - new DataColumn("LineTotal", typeof(Decimal), "UnitPrice*OrderQty") - }; - - orderDetailTable.Columns.AddRange(cols); - orderDetailTable.PrimaryKey = new DataColumn[] { orderDetailTable.Columns["OrderDetailId"] }; - return orderDetailTable; - } - - private static void InsertOrders(DataTable orderTable) - { - // Add one row once. - DataRow row1 = orderTable.NewRow(); - row1["OrderId"] = "O0001"; - row1["OrderDate"] = new DateTime(2013, 3, 1); - orderTable.Rows.Add(row1); - - DataRow row2 = orderTable.NewRow(); - row2["OrderId"] = "O0002"; - row2["OrderDate"] = new DateTime(2013, 3, 12); - orderTable.Rows.Add(row2); - - DataRow row3 = orderTable.NewRow(); - row3["OrderId"] = "O0003"; - row3["OrderDate"] = new DateTime(2013, 3, 20); - orderTable.Rows.Add(row3); - } - - private static void InsertOrderDetails(DataTable orderDetailTable) - { - // Use an Object array to insert all the rows . - // Values in the array are matched sequentially to the columns, based on the order in which they appear in the table. - Object[] rows = - { - new Object[] { 1, "O0001", "Mountain Bike", 1419.5, 36 }, - new Object[] { 2, "O0001", "Road Bike", 1233.6, 16 }, - new Object[] { 3, "O0001", "Touring Bike", 1653.3, 32 }, - new Object[] { 4, "O0002", "Mountain Bike", 1419.5, 24 }, - new Object[] { 5, "O0002", "Road Bike", 1233.6, 12 }, - new Object[] { 6, "O0003", "Mountain Bike", 1419.5, 48 }, - new Object[] { 7, "O0003", "Touring Bike", 1653.3, 8 }, - }; - - foreach (Object[] row in rows) - { - orderDetailTable.Rows.Add(row); - } - } - - private static void ShowTable(DataTable table) - { - foreach (DataColumn col in table.Columns) - { - Console.Write("{0,-14}", col.ColumnName); - } - Console.WriteLine(); - - foreach (DataRow row in table.Rows) - { - foreach (DataColumn col in table.Columns) - { - if (col.DataType.Equals(typeof(DateTime))) - Console.Write("{0,-14:d}", row[col]); - else if (col.DataType.Equals(typeof(Decimal))) - Console.Write("{0,-14:C}", row[col]); - else - Console.Write("{0,-14}", row[col]); - } - Console.WriteLine(); - } - Console.WriteLine(); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/source.vb b/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/source.vb deleted file mode 100644 index 1b0b43cdbbe34..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Data/DataTable/Overview/vb/source.vb +++ /dev/null @@ -1,137 +0,0 @@ -' -Imports System.Data - -Class Program - Public Shared Sub Main(args As String()) - ' Create two tables and add them into the DataSet - Dim orderTable As DataTable = CreateOrderTable() - Dim orderDetailTable As DataTable = CreateOrderDetailTable() - Dim salesSet As New DataSet() - salesSet.Tables.Add(orderTable) - salesSet.Tables.Add(orderDetailTable) - - ' Set the relations between the tables and create the related constraint. - salesSet.Relations.Add("OrderOrderDetail", orderTable.Columns("OrderId"), orderDetailTable.Columns("OrderId"), True) - - Console.WriteLine("After creating the foreign key constriant, you will see the following error if inserting order detail with the wrong OrderId: ") - Try - Dim errorRow As DataRow = orderDetailTable.NewRow() - errorRow(0) = 1 - errorRow(1) = "O0007" - orderDetailTable.Rows.Add(errorRow) - Catch e As Exception - Console.WriteLine(e.Message) - End Try - Console.WriteLine() - - ' Insert the rows into the table - InsertOrders(orderTable) - InsertOrderDetails(orderDetailTable) - - Console.WriteLine("The initial Order table.") - ShowTable(orderTable) - - Console.WriteLine("The OrderDetail table.") - ShowTable(orderDetailTable) - - ' Use the Aggregate-Sum on the child table column to get the result. - Dim colSub As New DataColumn("SubTotal", GetType([Decimal]), "Sum(Child.LineTotal)") - orderTable.Columns.Add(colSub) - - ' Compute the tax by referencing the SubTotal expression column. - Dim colTax As New DataColumn("Tax", GetType([Decimal]), "SubTotal*0.1") - orderTable.Columns.Add(colTax) - - ' If the OrderId is 'Total', compute the due on all orders; or compute the due on this order. - Dim colTotal As New DataColumn("TotalDue", GetType([Decimal]), "IIF(OrderId='Total',Sum(SubTotal)+Sum(Tax),SubTotal+Tax)") - orderTable.Columns.Add(colTotal) - - Dim row As DataRow = orderTable.NewRow() - row("OrderId") = "Total" - orderTable.Rows.Add(row) - - Console.WriteLine("The Order table with the expression columns.") - ShowTable(orderTable) - - Console.WriteLine("Press any key to exit.....") - Console.ReadKey() - End Sub - - Private Shared Function CreateOrderTable() As DataTable - Dim orderTable As New DataTable("Order") - - ' Define one column. - Dim colId As New DataColumn("OrderId", GetType([String])) - orderTable.Columns.Add(colId) - - Dim colDate As New DataColumn("OrderDate", GetType(DateTime)) - orderTable.Columns.Add(colDate) - - ' Set the OrderId column as the primary key. - orderTable.PrimaryKey = New DataColumn() {colId} - - Return orderTable - End Function - - Private Shared Function CreateOrderDetailTable() As DataTable - Dim orderDetailTable As New DataTable("OrderDetail") - - ' Define all the columns once. - Dim cols As DataColumn() = {New DataColumn("OrderDetailId", GetType(Int32)), New DataColumn("OrderId", GetType([String])), New DataColumn("Product", GetType([String])), New DataColumn("UnitPrice", GetType([Decimal])), New DataColumn("OrderQty", GetType(Int32)), New DataColumn("LineTotal", GetType([Decimal]), "UnitPrice*OrderQty")} - - orderDetailTable.Columns.AddRange(cols) - orderDetailTable.PrimaryKey = New DataColumn() {orderDetailTable.Columns("OrderDetailId")} - Return orderDetailTable - End Function - - Private Shared Sub InsertOrders(orderTable As DataTable) - ' Add one row once. - Dim row1 As DataRow = orderTable.NewRow() - row1("OrderId") = "O0001" - row1("OrderDate") = New DateTime(2013, 3, 1) - orderTable.Rows.Add(row1) - - Dim row2 As DataRow = orderTable.NewRow() - row2("OrderId") = "O0002" - row2("OrderDate") = New DateTime(2013, 3, 12) - orderTable.Rows.Add(row2) - - Dim row3 As DataRow = orderTable.NewRow() - row3("OrderId") = "O0003" - row3("OrderDate") = New DateTime(2013, 3, 20) - orderTable.Rows.Add(row3) - End Sub - - Private Shared Sub InsertOrderDetails(orderDetailTable As DataTable) - ' Use an Object array to insert all the rows . - ' Values in the array are matched sequentially to the columns, based on the order in which they appear in the table. - Dim rows As [Object]() = {New [Object]() {1, "O0001", "Mountain Bike", 1419.5, 36}, New [Object]() {2, "O0001", "Road Bike", 1233.6, 16}, New [Object]() {3, "O0001", "Touring Bike", 1653.3, 32}, New [Object]() {4, "O0002", "Mountain Bike", 1419.5, 24}, New [Object]() {5, "O0002", "Road Bike", 1233.6, 12}, New [Object]() {6, "O0003", "Mountain Bike", 1419.5, 48}, _ - New [Object]() {7, "O0003", "Touring Bike", 1653.3, 8}} - - For Each row As [Object]() In rows - orderDetailTable.Rows.Add(row) - Next - End Sub - - Private Shared Sub ShowTable(table As DataTable) - For Each col As DataColumn In table.Columns - Console.Write("{0,-14}", col.ColumnName) - Next - Console.WriteLine() - - For Each row As DataRow In table.Rows - For Each col As DataColumn In table.Columns - If col.DataType.Equals(GetType(DateTime)) Then - Console.Write("{0,-14:d}", row(col)) - ElseIf col.DataType.Equals(GetType([Decimal])) Then - Console.Write("{0,-14:C}", row(col)) - Else - Console.Write("{0,-14}", row(col)) - End If - Next - Console.WriteLine() - Next - Console.WriteLine() - End Sub -End Class -' \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/Project.csproj deleted file mode 100644 index 22dd9034898ba..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/Project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Library - net10.0 - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program.cs deleted file mode 100644 index ea0a16a39f05f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -using System.Diagnostics.Tracing; - -namespace Demo1 -{ - // - sealed class MyCompanyEventSource : EventSource - { - public static MyCompanyEventSource Log = new MyCompanyEventSource(); - - public void Startup() { WriteEvent(1); } - public void OpenFileStart(string fileName) { WriteEvent(2, fileName); } - public void OpenFileStop() { WriteEvent(3); } - } - // - - // - class Program1 - { - static void Main(string[] args) - { - MyCompanyEventSource.Log.Startup(); - // ... - MyCompanyEventSource.Log.OpenFileStart("SomeFile"); - // ... - MyCompanyEventSource.Log.OpenFileStop(); - } - } - // -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program1.cs deleted file mode 100644 index d8e5bf53a08a6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program1.cs +++ /dev/null @@ -1,102 +0,0 @@ -// -using System; -using System.Diagnostics.Tracing; - -namespace Demo2 -{ - enum MyColor { Red, Yellow, Blue }; - - [EventSource(Name = "MyCompany")] - sealed class MyCompanyEventSource : EventSource - { - // - // - public static class Keywords - { - public const EventKeywords Page = (EventKeywords)1; - public const EventKeywords DataBase = (EventKeywords)2; - public const EventKeywords Diagnostic = (EventKeywords)4; - public const EventKeywords Perf = (EventKeywords)8; - } - // - - // - public static class Tasks - { - public const EventTask Page = (EventTask)1; - public const EventTask DBQuery = (EventTask)2; - } - // - // - - // - [Event(1, Message = "Application Failure: {0}", Level = EventLevel.Error, Keywords = Keywords.Diagnostic)] - public void Failure(string message) { WriteEvent(1, message); } - // - - // - [Event(2, Message = "Starting up.", Keywords = Keywords.Perf, Level = EventLevel.Informational)] - public void Startup() { WriteEvent(2); } - // - - // - [Event(3, Message = "loading page {1} activityID={0}", Opcode = EventOpcode.Start, - Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)] - public void PageStart(int ID, string url) { if (IsEnabled()) WriteEvent(3, ID, url); } - // - - // - [Event(4, Opcode = EventOpcode.Stop, Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)] - public void PageStop(int ID) { if (IsEnabled()) WriteEvent(4, ID); } - // - - // - [Event(5, Opcode = EventOpcode.Start, Task = Tasks.DBQuery, Keywords = Keywords.DataBase, Level = EventLevel.Informational)] - public void DBQueryStart(string sqlQuery) { WriteEvent(5, sqlQuery); } - // - - // - [Event(6, Opcode = EventOpcode.Stop, Task = Tasks.DBQuery, Keywords = Keywords.DataBase, Level = EventLevel.Informational)] - public void DBQueryStop() { WriteEvent(6); } - // - - // - [Event(7, Level = EventLevel.Verbose, Keywords = Keywords.DataBase)] - public void Mark(int ID) { if (IsEnabled()) WriteEvent(7, ID); } - // - - // - [Event(8)] - public void LogColor(MyColor color) { WriteEvent(8, (int)color); } - // - - public static MyCompanyEventSource Log = new MyCompanyEventSource(); - } - - class Program - { - static void Main(string[] args) - { - // - MyCompanyEventSource.Log.Startup(); - Console.WriteLine("Starting up"); - - MyCompanyEventSource.Log.DBQueryStart("Select * from MYTable"); - var url = "http://localhost"; - for (int i = 0; i < 10; i++) - { - MyCompanyEventSource.Log.PageStart(i, url); - MyCompanyEventSource.Log.Mark(i); - MyCompanyEventSource.Log.PageStop(i); - } - MyCompanyEventSource.Log.DBQueryStop(); - MyCompanyEventSource.Log.LogColor(MyColor.Blue); - - MyCompanyEventSource.Log.Failure("This is a failure 1"); - MyCompanyEventSource.Log.Failure("This is a failure 2"); - MyCompanyEventSource.Log.Failure("This is a failure 3"); - // - } - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program2.cs deleted file mode 100644 index d8021c6f89fbe..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/csharp/program2.cs +++ /dev/null @@ -1,199 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Diagnostics.Tracing; - -namespace Demo -{ - // - public interface IMyLogging - { - void Error(int errorCode, string message); - void Warning(string message); - } - - public sealed class MySource : EventSource, IMyLogging - { - public static MySource Log = new(); - - [Event(1)] - public void Error(int errorCode, string message) => WriteEvent(1, errorCode, message); - - [Event(2)] - public void Warning(string message) => WriteEvent(2, message); - } - // - - // - public abstract class UtilBaseEventSource : EventSource - { - protected UtilBaseEventSource() - : base() - { } - - protected UtilBaseEventSource(bool throwOnEventWriteErrors) - : base(throwOnEventWriteErrors) - { } - - // helper overload of WriteEvent for optimizing writing an event containing - // payload properties that don't align with a provided overload. This prevents - // EventSource from using the object[] overload which is expensive. - protected unsafe void WriteEvent(int eventId, int arg1, short arg2, long arg3) - { - if (IsEnabled()) - { - EventSource.EventData* descrs = stackalloc EventSource.EventData[3]; - descrs[0] = new EventData { DataPointer = (IntPtr)(&arg1), Size = 4 }; - descrs[1] = new EventData { DataPointer = (IntPtr)(&arg2), Size = 2 }; - descrs[2] = new EventData { DataPointer = (IntPtr)(&arg3), Size = 8 }; - WriteEventCore(eventId, 3, descrs); - } - } - } - - public sealed class OptimizedEventSource : UtilBaseEventSource - { - public static OptimizedEventSource Log = new(); - - public static class Keywords - { - public const EventKeywords Kwd1 = (EventKeywords)1; - } - - [Event(1, Keywords = Keywords.Kwd1, Level = EventLevel.Informational, Message = "LogElements called {0}/{1}/{2}.")] - public void LogElements(int n, short sh, long l) => WriteEvent(1, n, sh, l); // uses the overload we added! - } - // - - // - public class ComplexComponent : IDisposable - { - internal static Dictionary _internalState = new(); - - private string _name; - - public ComplexComponent(string name) - { - _name = name ?? throw new ArgumentNullException(nameof(name)); - ComplexSource.Log.NewComponent(_name); - } - - public void SetState(string key, string value) - { - lock (_internalState) - { - _internalState[key] = value; - ComplexSource.Log.SetState(_name, key, value); - } - } - - private void ExpensiveWork1() => System.Threading.Thread.Sleep(TimeSpan.FromMilliseconds(250)); - private void ExpensiveWork2() => System.Threading.Thread.Sleep(TimeSpan.FromMilliseconds(250)); - private void ExpensiveWork3() => System.Threading.Thread.Sleep(TimeSpan.FromMilliseconds(250)); - private void ExpensiveWork4() => System.Threading.Thread.Sleep(TimeSpan.FromMilliseconds(250)); - - public void DoWork() - { - ComplexSource.Log.ExpensiveWorkStart(_name); - - ExpensiveWork1(); - ExpensiveWork2(); - ExpensiveWork3(); - ExpensiveWork4(); - - ComplexSource.Log.ExpensiveWorkStop(_name); - } - - public void Dispose() - { - ComplexSource.Log.ComponentDisposed(_name); - } - } - - internal sealed class ComplexSource : EventSource - { - public static ComplexSource Log = new(); - - public static class Keywords - { - public const EventKeywords ComponentLifespan = (EventKeywords)1; - public const EventKeywords StateChanges = (EventKeywords)(1 << 1); - public const EventKeywords Performance = (EventKeywords)(1 << 2); - public const EventKeywords DumpState = (EventKeywords)(1 << 3); - // a utility keyword for a common combination of keywords users might enable - public const EventKeywords StateTracking = ComponentLifespan & StateChanges & DumpState; - } - - protected override void OnEventCommand(EventCommandEventArgs args) - { - base.OnEventCommand(args); - - if (args.Command == EventCommand.Enable) - { - DumpComponentState(); - } - } - - [Event(1, Keywords = Keywords.ComponentLifespan, Message = "New component with name '{0}'.")] - public void NewComponent(string name) => WriteEvent(1, name); - - [Event(2, Keywords = Keywords.ComponentLifespan, Message = "Component with name '{0}' disposed.")] - public void ComponentDisposed(string name) => WriteEvent(2, name); - - [Event(3, Keywords = Keywords.StateChanges)] - public void SetState(string name, string key, string value) => WriteEvent(3, name, key, value); - - [Event(4, Keywords = Keywords.Performance)] - public void ExpensiveWorkStart(string name) => WriteEvent(4, name); - - [Event(5, Keywords = Keywords.Performance)] - public void ExpensiveWorkStop(string name) => WriteEvent(5, name); - - [Event(6, Keywords = Keywords.DumpState)] - public void ComponentState(string key, string value) => WriteEvent(6, key, value); - - [NonEvent] - public void DumpComponentState() - { - if (IsEnabled(EventLevel.Informational, Keywords.DumpState)) - { - lock (ComplexComponent._internalState) - { - foreach (var (key, value) in ComplexComponent._internalState) - ComponentState(key, value); - } - } - } - } - // - - //
- class Program - { - static void Main(string[] args) - { - Console.WriteLine($"PID: {System.Diagnostics.Process.GetCurrentProcess().Id}"); - - long i = 0; - while (true) - { - using ComplexComponent c1 = new($"COMPONENT_{i++}"); - using ComplexComponent c2 = new($"COMPONENT_{i++}"); - using ComplexComponent c3 = new($"COMPONENT_{i++}"); - using ComplexComponent c4 = new($"COMPONENT_{i++}"); - - c1.SetState("key1", "value1"); - c2.SetState("key2", "value2"); - c3.SetState("key3", "value3"); - c4.SetState("key4", "value4"); - - c1.DoWork(); - c2.DoWork(); - c3.DoWork(); - c4.DoWork(); - } - } - } - //
-} -//
diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program.vb deleted file mode 100644 index 95de28d88a350..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program.vb +++ /dev/null @@ -1,36 +0,0 @@ -' -Imports System.Diagnostics.Tracing - -' -Class MyCompanyEventSource - Inherits EventSource - Public Shared Log As New MyCompanyEventSource() - - Public Sub Startup() - WriteEvent(1) - End Sub - - Public Sub OpenFileStart(ByVal fileName As String) - WriteEvent(2, fileName) - End Sub - - Public Sub OpenFileStop() - WriteEvent(3) - End Sub -End Class -' - -' -Class Program - - Shared Sub Main(ByVal args() As String) - MyCompanyEventSource.Log.Startup() - ' ... - MyCompanyEventSource.Log.OpenFileStart("SomeFile") - ' ... - MyCompanyEventSource.Log.OpenFileStop() - - End Sub -End Class -' -' \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program1.vb deleted file mode 100644 index 41046ab377890..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics.Tracing/EventSource/Overview/vb/program1.vb +++ /dev/null @@ -1,118 +0,0 @@ -' -Imports System.Diagnostics.Tracing - -Enum MyColor - Red - Yellow - Blue -End Enum 'MyColor - -Class MyCompanyEventSource1 - Inherits EventSource - - ' - ' - Public Class Keywords - Public Const Page As EventKeywords = CType(1, EventKeywords) - Public Const DataBase As EventKeywords = CType(2, EventKeywords) - Public Const Diagnostic As EventKeywords = CType(4, EventKeywords) - Public Const Perf As EventKeywords = CType(8, EventKeywords) - End Class - ' - - ' - Public Class Tasks - Public Const Page As EventTask = CType(1, EventTask) - Public Const DBQuery As EventTask = CType(1, EventTask) - End Class - ' - ' - - ' - <[Event](1, Message:="Application Failure: {0}", Level:=EventLevel.Error, Keywords:=Keywords.Diagnostic)> - Public Sub Failure(ByVal message As String) - WriteEvent(1, message) - End Sub - ' - - ' - <[Event](2, Message:="Starting up.", Keywords:=Keywords.Perf, Level:=EventLevel.Informational)> - Public Sub Startup() - WriteEvent(2) - End Sub - ' - - ' - <[Event](3, Message:="loading page {1} activityID={0}", Opcode:=EventOpcode.Start, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> - Public Sub PageStart(ByVal ID As Integer, ByVal url As String) - If IsEnabled() Then - WriteEvent(3, ID, url) - End If - End Sub - ' - - ' - <[Event](4, Opcode:=EventOpcode.Stop, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> - Public Sub PageStop(ByVal ID As Integer) - If IsEnabled() Then - WriteEvent(4, ID) - End If - End Sub - ' - - ' - <[Event](5, Opcode:=EventOpcode.Start, Task:=Tasks.DBQuery, Keywords:=Keywords.DataBase, Level:=EventLevel.Informational)> - Public Sub DBQueryStart(ByVal sqlQuery As String) - WriteEvent(5, sqlQuery) - End Sub - ' - - ' - <[Event](6, Opcode:=EventOpcode.Stop, Task:=Tasks.DBQuery, Keywords:=Keywords.DataBase, Level:=EventLevel.Informational)> - Public Sub DBQueryStop() - WriteEvent(6) - End Sub - ' - - ' - <[Event](7, Level:=EventLevel.Verbose, Keywords:=Keywords.DataBase)> - Public Sub Mark(ByVal ID As Integer) - If IsEnabled() Then - WriteEvent(7, ID) - End If - End Sub - ' - - ' - <[Event](8)> - Public Sub LogColor(ByVal color As MyColor) - WriteEvent(8, Fix(color)) - End Sub - ' - Public Shared Log As New MyCompanyEventSource1() -End Class - -Class Program1 - - Shared Sub Main(ByVal args() As String) - ' - MyCompanyEventSource1.Log.Startup() - Console.WriteLine("Starting up") - MyCompanyEventSource1.Log.DBQueryStart("Select * from MYTable") - Dim url As String = "http:'localhost" - Dim i As Integer - For i = 0 To 9 - MyCompanyEventSource1.Log.PageStart(i, url) - MyCompanyEventSource1.Log.Mark(i) - MyCompanyEventSource1.Log.PageStop(i) - Next i - MyCompanyEventSource1.Log.DBQueryStop() - MyCompanyEventSource1.Log.LogColor(MyColor.Blue) - - MyCompanyEventSource1.Log.Failure("This is a failure 1") - MyCompanyEventSource1.Log.Failure("This is a failure 2") - MyCompanyEventSource1.Log.Failure("This is a failure 3") - ' - End Sub -End Class -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/Project.csproj deleted file mode 100644 index 2da0e2c488701..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/Project.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net10.0 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/averagecount32.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/averagecount32.cs deleted file mode 100644 index 684897f09fa9f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/CounterCreationData/Overview/csharp/averagecount32.cs +++ /dev/null @@ -1,169 +0,0 @@ -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App -{ - private static PerformanceCounter avgCounter64Sample; - private static PerformanceCounter avgCounter64SampleBase; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if (!PerformanceCounterCategory.Exists("AverageCounter64SampleCategory")) - { - CounterCreationDataCollection counterDataCollection = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData averageCount64 = new CounterCreationData(); - averageCount64.CounterType = PerformanceCounterType.AverageCount64; - averageCount64.CounterName = "AverageCounter64Sample"; - counterDataCollection.Add(averageCount64); - - // Add the base counter. - CounterCreationData averageCount64Base = new CounterCreationData(); - averageCount64Base.CounterType = PerformanceCounterType.AverageBase; - averageCount64Base.CounterName = "AverageCounter64SampleBase"; - counterDataCollection.Add(averageCount64Base); - - // Create the category. - PerformanceCounterCategory.Create("AverageCounter64SampleCategory", - "Demonstrates usage of the AverageCounter64 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, counterDataCollection); - - return (true); - } - else - { - Console.WriteLine("Category exists - AverageCounter64SampleCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counters. - - // - avgCounter64Sample = new PerformanceCounter("AverageCounter64SampleCategory", - "AverageCounter64Sample", - false); - - // - - avgCounter64SampleBase = new PerformanceCounter("AverageCounter64SampleCategory", - "AverageCounter64SampleBase", - false); - - avgCounter64Sample.RawValue = 0; - avgCounter64SampleBase.RawValue = 0; - } - // - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random(DateTime.Now.Millisecond); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - int value = r.Next(1, 10); - Console.Write(j + " = " + value); - - avgCounter64Sample.IncrementBy(value); - - avgCounter64SampleBase.Increment(); - - if ((j % 10) == 9) - { - OutputSample(avgCounter64Sample.NextSample()); - samplesList.Add(avgCounter64Sample.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - // - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - // Description - This counter type shows how many items are processed, on average, - // during an operation. Counters of this type display a ratio of the items - // processed (such as bytes sent) to the number of operations completed. The - // ratio is calculated by comparing the number of items processed during the - // last interval to the number of operations completed during the last interval. - // Generic type - Average - // Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number - // of items processed during the last sample interval and the denominator (D) - // represents the number of operations completed during the last two sample - // intervals. - // Average (Nx - N0) / (Dx - D0) - // Example PhysicalDisk\ Avg. Disk Bytes/Transfer - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single numerator = (Single)s1.RawValue - (Single)s0.RawValue; - Single denomenator = (Single)s1.BaseValue - (Single)s0.BaseValue; - Single counterValue = numerator / denomenator; - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/Project.csproj deleted file mode 100644 index 2da0e2c488701..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/Project.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net10.0 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/elapsedtime.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/elapsedtime.cs deleted file mode 100644 index bb9916d1596b8..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounter/NextValue/csharp/elapsedtime.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Notice that the sample is conditionally compiled for Everett vs. -// Whidbey builds. Whidbey introduced new APIs that are not available -// in Everett. Snippet IDs do not overlap between Whidbey and Everett; -// Snippet #1 is Everett, Snippet #2 and #3 are Whidbey. - -#if (BELOW_WHIDBEY_BUILD) - -// -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; -using System.Runtime.InteropServices; - -public class App -{ - private static PerformanceCounter PC; - - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - SetupCategory(); - CreateCounters(); - CollectSamples(samplesList); - } - - - private static bool SetupCategory() - { - if ( !PerformanceCounterCategory.Exists("ElapsedTimeSampleCategory") ) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData ETimeData = new CounterCreationData(); - ETimeData.CounterType = PerformanceCounterType.ElapsedTime; - ETimeData.CounterName = "ElapsedTimeSample"; - CCDC.Add(ETimeData); - - // Create the category. - PerformanceCounterCategory.Create("ElapsedTimeSampleCategory", - "Demonstrates usage of the ElapsedTime performance counter type.", - CCDC); - - return(true); - } - else - { - Console.WriteLine("Category exists - ElapsedTimeSampleCategory"); - return(false); - } - } - - private static void CreateCounters() - { - // Create the counter. - PC = new PerformanceCounter("ElapsedTimeSampleCategory", - "ElapsedTimeSample", - false); - - } - - private static void CollectSamples(ArrayList samplesList) - { - - long pcValue; - DateTime Start; - - // Initialize the counter. - QueryPerformanceCounter(out pcValue); - PC.RawValue = pcValue; - Start = DateTime.Now; - - // Loop for the samples. - for (int j = 0; j < 1000; j++) - { - // Output the values. - if ((j % 10) == 9) - { - Console.WriteLine("NextValue() = " + PC.NextValue().ToString()); - Console.WriteLine("Actual elapsed time = " + DateTime.Now.Subtract(Start).ToString()); - OutputSample(PC.NextSample()); - samplesList.Add( PC.NextSample() ); - } - - // Reset the counter on 100th iteration. - if (j % 100 == 0) - { - QueryPerformanceCounter(out pcValue); - PC.RawValue = pcValue; - Start = DateTime.Now; - } - System.Threading.Thread.Sleep(50); - } - - Console.WriteLine("Elapsed time = " + DateTime.Now.Subtract(Start).ToString()); - } - - - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } - - - // Reads the counter information to enable setting the RawValue. - [DllImport("Kernel32.dll")] - public static extern bool QueryPerformanceCounter(out long value); -} -// - -#else -// Build sample for Whidbey or higher. - -// - -using System; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App -{ - public static void Main() - { - CollectSamples(); - } - - public static void CollectSamples() - { - const String categoryName = "ElapsedTimeSampleCategory"; - const String counterName = "ElapsedTimeSample"; - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if ( !PerformanceCounterCategory.Exists(categoryName) ) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData ETimeData = new CounterCreationData(); - ETimeData.CounterType = PerformanceCounterType.ElapsedTime; - ETimeData.CounterName = counterName; - CCDC.Add(ETimeData); - - // Create the category. - PerformanceCounterCategory.Create(categoryName, - "Demonstrates ElapsedTime performance counter usage.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - // Return, rerun the application to make use of the new counters. - return; - } - else - { - Console.WriteLine($"Category exists - {categoryName}"); - } - - // - // Create the performance counter. - PerformanceCounter PC = new PerformanceCounter(categoryName, - counterName, - false); - // Initialize the counter. - PC.RawValue = Stopwatch.GetTimestamp(); - // - - DateTime Start = DateTime.Now; - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - // Output the values. - if ((j % 10) == 9) - { - Console.WriteLine("NextValue() = " + PC.NextValue().ToString()); - Console.WriteLine("Actual elapsed time = " + DateTime.Now.Subtract(Start).ToString()); - OutputSample(PC.NextSample()); - } - - // Reset the counter on every 20th iteration. - if (j % 20 == 0) - { - PC.RawValue = Stopwatch.GetTimestamp(); - Start = DateTime.Now; - } - System.Threading.Thread.Sleep(50); - } - - Console.WriteLine("Elapsed time = " + DateTime.Now.Subtract(Start).ToString()); - } - - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} -// -#endif diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/Project.csproj deleted file mode 100644 index 2da0e2c488701..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/Project.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net10.0 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/averagetimer32.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/averagetimer32.cs deleted file mode 100644 index a729d165f2bd5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/averagetimer32.cs +++ /dev/null @@ -1,370 +0,0 @@ -// Notice that the sample is conditionally compiled for Everett vs. -// Whidbey builds. Whidbey introduced new APIs that are not available -// in Everett. Snippet IDs do not overlap between Whidbey and Everett; -// Snippet #1 is Everett, Snippet #2 and #3 are Whidbey. - -#if (BELOW_WHIDBEY_BUILD) - -// - -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; -using System.Runtime.InteropServices; - -public class App -{ - - private static PerformanceCounter PC; - private static PerformanceCounter BPC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - SetupCategory(); - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - - - - private static bool SetupCategory() - { - - if ( !PerformanceCounterCategory.Exists("AverageTimer32SampleCategory") ) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData averageTimer32 = new CounterCreationData(); - averageTimer32.CounterType = PerformanceCounterType.AverageTimer32; - averageTimer32.CounterName = "AverageTimer32Sample"; - CCDC.Add(averageTimer32); - - // Add the base counter. - CounterCreationData averageTimer32Base = new CounterCreationData(); - averageTimer32Base.CounterType = PerformanceCounterType.AverageBase; - averageTimer32Base.CounterName = "AverageTimer32SampleBase"; - CCDC.Add(averageTimer32Base); - - // Create the category. - PerformanceCounterCategory.Create("AverageTimer32SampleCategory", - "Demonstrates usage of the AverageTimer32 performance counter type", - CCDC); - - return(true); - } - else - { - Console.WriteLine("Category exists - " + "AverageTimer32SampleCategory"); - return(false); - } - } - - private static void CreateCounters() - { - // Create the counters. - PC = new PerformanceCounter("AverageTimer32SampleCategory", - "AverageTimer32Sample", - false); - - BPC = new PerformanceCounter("AverageTimer32SampleCategory", - "AverageTimer32SampleBase", - false); - - PC.RawValue = 0; - BPC.RawValue = 0; - } - - - private static void CollectSamples(ArrayList samplesList) - { - - long perfTime = 0; - Random r = new Random( DateTime.Now.Millisecond ); - - // Loop for the samples. - for (int i = 0; i < 10; i++) { - - QueryPerformanceCounter(out perfTime); - PC.RawValue = perfTime; - - BPC.IncrementBy(10); - - System.Threading.Thread.Sleep(1000); - Console.WriteLine("Next value = " + PC.NextValue().ToString()); - samplesList.Add(PC.NextSample()); - } - - } - - private static void CalculateResults(ArrayList samplesList) - { - for(int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample( (CounterSample)samplesList[i] ); - OutputSample( (CounterSample)samplesList[i+1] ); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSample.Calculate((CounterSample)samplesList[i], - (CounterSample)samplesList[i+1]) ); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i+1]) ); - - } - } - - - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - // PERF_AVERAGE_TIMER - // Description - This counter type measures the time it takes, on - // average, to complete a process or operation. Counters of this - // type display a ratio of the total elapsed time of the sample - // interval to the number of processes or operations completed - // during that time. This counter type measures time in ticks - // of the system clock. The F variable represents the number of - // ticks per second. The value of F is factored into the equation - // so that the result can be displayed in seconds. - // - // Generic type - Average - // - // Formula - ((N1 - N0) / F) / (D1 - D0), where the numerator (N) - // represents the number of ticks counted during the last - // sample interval, F represents the frequency of the ticks, - // and the denominator (D) represents the number of operations - // completed during the last sample interval. - // - // Average - ((Nx - N0) / F) / (Dx - D0) - // - // Example - PhysicalDisk\ Avg. Disk sec/Transfer - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Int64 n1 = s1.RawValue; - Int64 n0 = s0.RawValue; - ulong f = (ulong)s1.SystemFrequency; - Int64 d1 = s1.BaseValue; - Int64 d0 = s0.BaseValue; - - double numerator = (double)(n1 - n0); - double denominator = (double)(d1 - d0); - Single counterValue = (Single)(( numerator / f ) / denominator); - return(counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } - - - [DllImport("Kernel32.dll")] - public static extern bool QueryPerformanceCounter(out long value); - -} - -// -#else -// Build sample for Whidbey or higher. - -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App2 -{ - private static PerformanceCounter PC; - private static PerformanceCounter BPC; - - private const String categoryName = "AverageTimer32SampleCategory"; - private const String counterName = "AverageTimer32Sample"; - private const String baseCounterName = "AverageTimer32SampleBase"; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if (!PerformanceCounterCategory.Exists(categoryName)) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData averageTimer32 = new CounterCreationData(); - averageTimer32.CounterType = PerformanceCounterType.AverageTimer32; - averageTimer32.CounterName = counterName; - CCDC.Add(averageTimer32); - - // Add the base counter. - CounterCreationData averageTimer32Base = new CounterCreationData(); - averageTimer32Base.CounterType = PerformanceCounterType.AverageBase; - averageTimer32Base.CounterName = baseCounterName; - CCDC.Add(averageTimer32Base); - - // Create the category. - PerformanceCounterCategory.Create(categoryName, - "Demonstrates usage of the AverageTimer32 performance counter type", - PerformanceCounterCategoryType.SingleInstance, CCDC); - - Console.WriteLine("Category created - " + categoryName); - - return (true); - } - else - { - Console.WriteLine("Category exists - " + categoryName); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counters. - PC = new PerformanceCounter(categoryName, - counterName, - false); - - BPC = new PerformanceCounter(categoryName, - baseCounterName, - false); - - PC.RawValue = 0; - BPC.RawValue = 0; - } - - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random(DateTime.Now.Millisecond); - - // Loop for the samples. - for (int i = 0; i < 10; i++) - { - - PC.RawValue = Stopwatch.GetTimestamp(); - - BPC.IncrementBy(10); - - System.Threading.Thread.Sleep(1000); - - Console.WriteLine("Next value = " + PC.NextValue().ToString()); - samplesList.Add(PC.NextSample()); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSample.Calculate((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - // PERF_AVERAGE_TIMER - // Description - This counter type measures the time it takes, on - // average, to complete a process or operation. Counters of this - // type display a ratio of the total elapsed time of the sample - // interval to the number of processes or operations completed - // during that time. This counter type measures time in ticks - // of the system clock. The F variable represents the number of - // ticks per second. The value of F is factored into the equation - // so that the result can be displayed in seconds. - // - // Generic type - Average - // - // Formula - ((N1 - N0) / F) / (D1 - D0), where the numerator (N) - // represents the number of ticks counted during the last - // sample interval, F represents the frequency of the ticks, - // and the denominator (D) represents the number of operations - // completed during the last sample interval. - // - // Average - ((Nx - N0) / F) / (Dx - D0) - // - // Example - PhysicalDisk\ Avg. Disk sec/Transfer - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Int64 n1 = s1.RawValue; - Int64 n0 = s0.RawValue; - ulong f = (ulong)s1.SystemFrequency; - Int64 d1 = s1.BaseValue; - Int64 d0 = s0.BaseValue; - - double numerator = (double)(n1 - n0); - double denominator = (double)(d1 - d0); - Single counterValue = (Single)((numerator / f) / denominator); - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} - -// - -#endif diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems32.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems32.cs deleted file mode 100644 index 18eee683b867d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems32.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; - -public class NumberOfItems64 -{ - - private static PerformanceCounter PC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if ( !PerformanceCounterCategory.Exists("NumberOfItems32SampleCategory") ) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData NOI64 = new CounterCreationData(); - NOI64.CounterType = PerformanceCounterType.NumberOfItems64; - NOI64.CounterName = "NumberOfItems32Sample"; - CCDC.Add(NOI64); - - // Create the category. - PerformanceCounterCategory.Create("NumberOfItems32SampleCategory", - "Demonstrates usage of the NumberOfItems32 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - - return(true); - } - else - { - Console.WriteLine("Category exists - NumberOfItems32SampleCategory"); - return(false); - } - } - - private static void CreateCounters() - { - // Create the counter. - PC = new PerformanceCounter("NumberOfItems32SampleCategory", - "NumberOfItems32Sample", - false); - - PC.RawValue=0; - } - - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random( DateTime.Now.Millisecond ); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - int value = r.Next(1, 10); - Console.Write(j + " = " + value); - - PC.IncrementBy(value); - - if ((j % 10) == 9) - { - OutputSample(PC.NextSample()); - samplesList.Add( PC.NextSample() ); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for(int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample( (CounterSample)samplesList[i] ); - OutputSample( (CounterSample)samplesList[i+1] ); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i+1]) ); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i+1]) ); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single counterValue = s1.RawValue; - return(counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems64.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems64.cs deleted file mode 100644 index ca73e6be7ff37..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/numberofitems64.cs +++ /dev/null @@ -1,134 +0,0 @@ -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class NumberOfItems64_1 -{ - private static PerformanceCounter PC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Perfomance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if (!PerformanceCounterCategory.Exists("NumberOfItems64SampleCategory")) - { - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData NOI64 = new CounterCreationData(); - NOI64.CounterType = PerformanceCounterType.NumberOfItems64; - NOI64.CounterName = "NumberOfItems64Sample"; - CCDC.Add(NOI64); - - // Create the category. - PerformanceCounterCategory.Create("NumberOfItems64SampleCategory", - "Demonstrates usage of the NumberOfItems64 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - return (true); - } - else - { - Console.WriteLine("Category exists - NumberOfItems64SampleCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counters. - PC = new PerformanceCounter("NumberOfItems64SampleCategory", - "NumberOfItems64Sample", - false); - - PC.RawValue = 0; - } - - private static void CollectSamples(ArrayList samplesList) - { - Random r = new Random(DateTime.Now.Millisecond); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - int value = r.Next(1, 10); - Console.Write(j + " = " + value); - - PC.IncrementBy(value); - - if ((j % 10) == 9) - { - OutputSample(PC.NextSample()); - samplesList.Add(PC.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single counterValue = s1.RawValue; - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/program.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/program.cs deleted file mode 100644 index 6cdc59d744bdd..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/program.cs +++ /dev/null @@ -1,155 +0,0 @@ -// -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; - -// Provides a SampleFraction counter to measure the percentage of the user processor -// time for this process to total processor time for the process. -public class App -{ - - private static PerformanceCounter perfCounter; - private static PerformanceCounter basePerfCounter; - private static Process thisProcess = Process.GetCurrentProcess(); - - public static void Main() - { - - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if (!PerformanceCounterCategory.Exists("SampleFractionCategory")) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData sampleFraction = new CounterCreationData(); - sampleFraction.CounterType = PerformanceCounterType.SampleFraction; - sampleFraction.CounterName = "SampleFractionSample"; - CCDC.Add(sampleFraction); - - // Add the base counter. - CounterCreationData sampleFractionBase = new CounterCreationData(); - sampleFractionBase.CounterType = PerformanceCounterType.SampleBase; - sampleFractionBase.CounterName = "SampleFractionSampleBase"; - CCDC.Add(sampleFractionBase); - - // Create the category. - PerformanceCounterCategory.Create("SampleFractionCategory", - "Demonstrates usage of the SampleFraction performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - - return (true); - } - else - { - Console.WriteLine("Category exists - SampleFractionCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counters. - - perfCounter = new PerformanceCounter("SampleFractionCategory", - "SampleFractionSample", - false); - - basePerfCounter = new PerformanceCounter("SampleFractionCategory", - "SampleFractionSampleBase", - false); - - perfCounter.RawValue = thisProcess.UserProcessorTime.Ticks; - basePerfCounter.RawValue = thisProcess.TotalProcessorTime.Ticks; - } - private static void CollectSamples(ArrayList samplesList) - { - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - perfCounter.IncrementBy(thisProcess.UserProcessorTime.Ticks); - - basePerfCounter.IncrementBy(thisProcess.TotalProcessorTime.Ticks); - - if ((j % 10) == 9) - { - OutputSample(perfCounter.NextSample()); - samplesList.Add(perfCounter.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - // Description - This counter type provides A percentage counter that shows the - // average ratio of user proccessor time to total processor time during the last - // two sample intervals. - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single numerator = (Single)s1.RawValue - (Single)s0.RawValue; - Single denomenator = (Single)s1.BaseValue - (Single)s0.BaseValue; - Single counterValue = 100 * (numerator / denomenator); - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond32.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond32.cs deleted file mode 100644 index 0ccd952350c2e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond32.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App3 -{ - private static PerformanceCounter PC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Perfomance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - if (!PerformanceCounterCategory.Exists("RateOfCountsPerSecond32SampleCategory")) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData rateOfCounts32 = new CounterCreationData(); - rateOfCounts32.CounterType = PerformanceCounterType.RateOfCountsPerSecond32; - rateOfCounts32.CounterName = "RateOfCountsPerSecond32Sample"; - CCDC.Add(rateOfCounts32); - - // Create the category. - PerformanceCounterCategory.Create("RateOfCountsPerSecond32SampleCategory", - "Demonstrates usage of the RateOfCountsPerSecond32 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - return (true); - } - else - { - Console.WriteLine("Category exists - RateOfCountsPerSecond32SampleCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counter. - PC = new PerformanceCounter("RateOfCountsPerSecond32SampleCategory", - "RateOfCountsPerSecond32Sample", - false); - - PC.RawValue = 0; - } - - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random(DateTime.Now.Millisecond); - - // Initialize the performance counter. - PC.NextSample(); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - int value = r.Next(1, 10); - PC.IncrementBy(value); - Console.Write(j + " = " + value); - - if ((j % 10) == 9) - { - Console.WriteLine("; NextValue() = " + PC.NextValue().ToString()); - OutputSample(PC.NextSample()); - samplesList.Add(PC.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - // PERF_COUNTER_COUNTER - // Description - This counter type shows the average number of operations completed - // during each second of the sample interval. Counters of this type - // measure time in ticks of the system clock. The F variable represents - // the number of ticks per second. The value of F is factored into the - // equation so that the result can be displayed in seconds. - // - // Generic type - Difference - // - // Formula - (N1 - N0) / ( (D1 - D0) / F), where the numerator (N) represents the number - // of operations performed during the last sample interval, the denominator - // (D) represents the number of ticks elapsed during the last sample - // interval, and F is the frequency of the ticks. - // - // Average - (Nx - N0) / ((Dx - D0) / F) - // - // Example - System\ File Read Operations/sec - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single numerator = (Single)(s1.RawValue - s0.RawValue); - Single denomenator = (Single)(s1.TimeStamp - s0.TimeStamp) / (Single)s1.SystemFrequency; - Single counterValue = numerator / denomenator; - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} - -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond64.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond64.cs deleted file mode 100644 index 8e3c492d8628a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rateofcountspersecond64.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App4 -{ - private static PerformanceCounter PC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Perfomance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the category. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - - if (!PerformanceCounterCategory.Exists("RateOfCountsPerSecond64SampleCategory")) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData rateOfCounts64 = new CounterCreationData(); - rateOfCounts64.CounterType = PerformanceCounterType.RateOfCountsPerSecond64; - rateOfCounts64.CounterName = "RateOfCountsPerSecond64Sample"; - CCDC.Add(rateOfCounts64); - - // Create the category. - PerformanceCounterCategory.Create("RateOfCountsPerSecond64SampleCategory", - "Demonstrates usage of the RateOfCountsPerSecond64 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - return (true); - } - else - { - Console.WriteLine("Category exists - RateOfCountsPerSecond64SampleCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counter. - PC = new PerformanceCounter("RateOfCountsPerSecond64SampleCategory", - "RateOfCountsPerSecond64Sample", - false); - - PC.RawValue = 0; - } - - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random(DateTime.Now.Millisecond); - - // Initialize the performance counter. - PC.NextSample(); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - - int value = r.Next(1, 10); - PC.IncrementBy(value); - Console.Write(j + " = " + value); - - if ((j % 10) == 9) - { - Console.WriteLine("; NextValue() = " + PC.NextValue().ToString()); - OutputSample(PC.NextSample()); - samplesList.Add(PC.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < (samplesList.Count - 1); i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - OutputSample((CounterSample)samplesList[i + 1]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i], - (CounterSample)samplesList[i + 1])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - // PERF_COUNTER_COUNTER - // Description - This counter type shows the average number of operations completed - // during each second of the sample interval. Counters of this type - // measure time in ticks of the system clock. The F variable represents - // the number of ticks per second. The value of F is factored into the - // equation so that the result can be displayed in seconds. - // - // Generic type - Difference - // - // Formula - (N1 - N0) / ( (D1 - D0) / F), where the numerator (N) represents the number - // of operations performed during the last sample interval, the denominator - // (D) represents the number of ticks elapsed during the last sample - // interval, and F is the frequency of the ticks. - // - // Average - (Nx - N0) / ((Dx - D0) / F) - // - // Example - System\ File Read Operations/sec - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1) - { - Single numerator = (Single)(s1.RawValue - s0.RawValue); - Single denomenator = (Single)(s1.TimeStamp - s0.TimeStamp) / (Single)s1.SystemFrequency; - Single counterValue = numerator / denomenator; - return (counterValue); - } - - private static void OutputSample(CounterSample s) - { - Console.WriteLine("\r\n+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} - -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rawfraction.cs b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rawfraction.cs deleted file mode 100644 index 008ab43884ce8..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/csharp/rawfraction.cs +++ /dev/null @@ -1,172 +0,0 @@ -// -using System; -using System.Collections; -using System.Diagnostics; -using System.Runtime.Versioning; - -[SupportedOSPlatform("Windows")] -public class App5 -{ - private static PerformanceCounter PC; - private static PerformanceCounter BPC; - - public static void Main() - { - ArrayList samplesList = new ArrayList(); - - // If the category does not exist, create the category and exit. - // Performance counters should not be created and immediately used. - // There is a latency time to enable the counters, they should be created - // prior to executing the application that uses the counters. - // Execute this sample a second time to use the counters. - if (SetupCategory()) - return; - CreateCounters(); - CollectSamples(samplesList); - CalculateResults(samplesList); - } - - private static bool SetupCategory() - { - - if (!PerformanceCounterCategory.Exists("RawFractionSampleCategory")) - { - - CounterCreationDataCollection CCDC = new CounterCreationDataCollection(); - - // Add the counter. - CounterCreationData rf = new CounterCreationData(); - rf.CounterType = PerformanceCounterType.RawFraction; - rf.CounterName = "RawFractionSample"; - CCDC.Add(rf); - - // Add the base counter. - CounterCreationData rfBase = new CounterCreationData(); - rfBase.CounterType = PerformanceCounterType.RawBase; - rfBase.CounterName = "RawFractionSampleBase"; - CCDC.Add(rfBase); - - // Create the category. - PerformanceCounterCategory.Create("RawFractionSampleCategory", - "Demonstrates usage of the RawFraction performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC); - - return (true); - } - else - { - Console.WriteLine("Category exists - RawFractionSampleCategory"); - return (false); - } - } - - private static void CreateCounters() - { - // Create the counters. - PC = new PerformanceCounter("RawFractionSampleCategory", - "RawFractionSample", - false); - - BPC = new PerformanceCounter("RawFractionSampleCategory", - "RawFractionSampleBase", - false); - - PC.RawValue = 0; - BPC.RawValue = 0; - } - - private static void CollectSamples(ArrayList samplesList) - { - - Random r = new Random(DateTime.Now.Millisecond); - - // Initialize the performance counter. - PC.NextSample(); - - // Loop for the samples. - for (int j = 0; j < 100; j++) - { - int value = r.Next(1, 10); - Console.Write(j + " = " + value); - - // Increment the base every time, because the counter measures the number - // of high hits (raw fraction value) against all the hits (base value). - BPC.Increment(); - - // Get the % of samples that are 9 or 10 out of all the samples taken. - if (value >= 9) - PC.Increment(); - - // Copy out the next value every ten times around the loop. - if ((j % 10) == 9) - { - Console.WriteLine("; NextValue() = " + PC.NextValue().ToString()); - OutputSample(PC.NextSample()); - samplesList.Add(PC.NextSample()); - } - else - { - Console.WriteLine(); - } - - System.Threading.Thread.Sleep(50); - } - } - - private static void CalculateResults(ArrayList samplesList) - { - for (int i = 0; i < samplesList.Count; i++) - { - // Output the sample. - OutputSample((CounterSample)samplesList[i]); - - // Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + - CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i])); - - // Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + - MyComputeCounterValue((CounterSample)samplesList[i])); - } - } - - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - // Formula from MSDN - - // Description - This counter type shows the ratio of a subset to its set as a percentage. - // For example, it compares the number of bytes in use on a disk to the - // total number of bytes on the disk. Counters of this type display the - // current percentage only, not an average over time. - // - // Generic type - Instantaneous, Percentage - // Formula - (N0 / D0), where D represents a measured attribute and N represents one - // component of that attribute. - // - // Average - SUM (N / D) /x - // Example - Paging File\% Usage Peak - //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - private static Single MyComputeCounterValue(CounterSample rfSample) - { - Single numerator = (Single)rfSample.RawValue; - Single denomenator = (Single)rfSample.BaseValue; - Single counterValue = (numerator / denomenator) * 100; - return (counterValue); - } - - // Output information about the counter sample. - private static void OutputSample(CounterSample s) - { - Console.WriteLine("+++++++++++"); - Console.WriteLine("Sample values - \r\n"); - Console.WriteLine(" BaseValue = " + s.BaseValue); - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency); - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp); - Console.WriteLine(" CounterType = " + s.CounterType); - Console.WriteLine(" RawValue = " + s.RawValue); - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency); - Console.WriteLine(" TimeStamp = " + s.TimeStamp); - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec); - Console.WriteLine("++++++++++++++++++++++"); - } -} - -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/Project.vbproj deleted file mode 100644 index 2da0e2c488701..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/Project.vbproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net10.0 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagecount32.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagecount32.vb deleted file mode 100644 index 067203ae7ecea..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagecount32.vb +++ /dev/null @@ -1,149 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class App1 - - Private Shared avgCounter64Sample As PerformanceCounter - Private Shared avgCounter64SampleBase As PerformanceCounter - - Public Shared Sub Main() - - Dim samplesList As New ArrayList() - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the App1lication that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - - End Sub - - Private Shared Function SetupCategory() As Boolean - If Not PerformanceCounterCategory.Exists("AverageCounter64SampleCategory") Then - - Dim counterDataCollection As New CounterCreationDataCollection() - - ' Add the counter. - Dim averageCount64 As New CounterCreationData() - averageCount64.CounterType = PerformanceCounterType.AverageCount64 - averageCount64.CounterName = "AverageCounter64Sample" - counterDataCollection.Add(averageCount64) - - ' Add the base counter. - Dim averageCount64Base As New CounterCreationData() - averageCount64Base.CounterType = PerformanceCounterType.AverageBase - averageCount64Base.CounterName = "AverageCounter64SampleBase" - counterDataCollection.Add(averageCount64Base) - - ' Create the category. - PerformanceCounterCategory.Create("AverageCounter64SampleCategory", - "Demonstrates usage of the AverageCounter64 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, counterDataCollection) - - Return True - Else - Console.WriteLine("Category exists - AverageCounter64SampleCategory") - Return False - End If - End Function 'SetupCategory - - Private Shared Sub CreateCounters() - ' Create the counters. - - ' - avgCounter64Sample = New PerformanceCounter("AverageCounter64SampleCategory", "AverageCounter64Sample", False) - ' - - avgCounter64SampleBase = New PerformanceCounter("AverageCounter64SampleCategory", "AverageCounter64SampleBase", False) - - avgCounter64Sample.RawValue = 0 - avgCounter64SampleBase.RawValue = 0 - End Sub - - ' - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - Dim value As Integer = r.Next(1, 10) - Console.Write(j.ToString() + " = " + value.ToString()) - - avgCounter64Sample.IncrementBy(value) - - avgCounter64SampleBase.Increment() - - If j Mod 10 = 9 Then - OutputSample(avgCounter64Sample.NextSample()) - samplesList.Add(avgCounter64Sample.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - ' - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - Next i - End Sub - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - ' Description - This counter type shows how many items are processed, on average, - ' during an operation. Counters of this type display a ratio of the items - ' processed (such as bytes sent) to the number of operations completed. The - ' ratio is calculated by comparing the number of items processed during the - ' last interval to the number of operations completed during the last interval. - ' Generic type - Average - ' Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number - ' of items processed during the last sample interval and the denominator (D) - ' represents the number of operations completed during the last two sample - ' intervals. - ' Average (Nx - N0) / (Dx - D0) - ' Example PhysicalDisk\ Avg. Disk Bytes/Transfer - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim numerator As [Single] = CType(s1.RawValue, [Single]) - CType(s0.RawValue, [Single]) - Dim denomenator As [Single] = CType(s1.BaseValue, [Single]) - CType(s0.BaseValue, [Single]) - Dim counterValue As [Single] = numerator / denomenator - Return counterValue - End Function 'MyComputeCounterValue - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine((" BaseValue = " + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagetimer32.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagetimer32.vb deleted file mode 100644 index a415b8951c5c1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/averagetimer32.vb +++ /dev/null @@ -1,392 +0,0 @@ -' Notice that the sample is conditionally compiled for Everett vs. -' Whidbey builds. Whidbey introduced new APIs that are not available -' in Everett. Snippet IDs do not overlap between Whidbey and Everett; -' Snippet #1 is Everett, Snippet #2 and #3 are Whidbey. - -#If BELOW_WHIDBEY_BUILD Then - -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.InteropServices - -Public Class App - - Private Shared PC As PerformanceCounter - Private Shared BPC As PerformanceCounter - - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the application that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - End Sub - - - Private Shared Function SetupCategory() As Boolean - - If Not PerformanceCounterCategory.Exists("AverageTimer32SampleCategory") Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim averageTimer32 As New CounterCreationData() - averageTimer32.CounterType = PerformanceCounterType.AverageTimer32 - averageTimer32.CounterName = "AverageTimer32Sample" - CCDC.Add(averageTimer32) - - ' Add the base counter. - Dim averageTimer32Base As New CounterCreationData() - averageTimer32Base.CounterType = PerformanceCounterType.AverageBase - averageTimer32Base.CounterName = "AverageTimer32SampleBase" - CCDC.Add(averageTimer32Base) - - ' Create the category. - PerformanceCounterCategory.Create( _ - "AverageTimer32SampleCategory", _ - "Demonstrates usage of the AverageTimer32 performance counter type", _ - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Return True - Else - Console.WriteLine(("Category exists - " + _ - "AverageTimer32SampleCategory")) - Return False - End If - End Function - - - Private Shared Sub CreateCounters() - ' Create the counters. - PC = New PerformanceCounter("AverageTimer32SampleCategory", _ - "AverageTimer32Sample", False) - - BPC = New PerformanceCounter("AverageTimer32SampleCategory", _ - "AverageTimer32SampleBase", False) - - PC.RawValue = 0 - BPC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(samplesList As ArrayList) - - Dim perfTime As Long = 0 - Dim r As New Random(DateTime.Now.Millisecond) - - ' Loop for the samples. - Dim i As Integer - For i = 0 To 9 - - QueryPerformanceCounter(perfTime) - PC.RawValue = perfTime - - BPC.IncrementBy(10) - - System.Threading.Thread.Sleep(1000) - Console.WriteLine(("Next value = " + PC.NextValue().ToString())) - samplesList.Add(PC.NextSample()) - Next i - End Sub - - - Private Shared Sub CalculateResults(samplesList As ArrayList) - Dim i As Integer - Dim sample1 As CounterSample - Dim sample2 As CounterSample - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - sample1 = CType(samplesList(i), CounterSample) - sample2 = CType(samplesList(i+1), CounterSample) - OutputSample(sample1) - OutputSample(sample2) - - ' Use .NET to calculate the counter value. - Console.WriteLine((".NET computed counter value = " _ - + CounterSample.Calculate(sample1, sample2).ToString())) - - ' Calculate the counter value manually. - Console.WriteLine(("My computed counter value = " _ - + MyComputeCounterValue(sample1, sample2).ToString())) - - Next i - End Sub - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - ' PERF_AVERAGE_TIMER - ' Description - This counter type measures the time it takes, on - ' average, to complete a process or operation. Counters of this - ' type display a ratio of the total elapsed time of the sample - ' interval to the number of processes or operations completed - ' during that time. This counter type measures time in ticks - ' of the system clock. The F variable represents the number of - ' ticks per second. The value of F is factored into the equation - ' so that the result can be displayed in seconds. - ' - ' Generic type - Average - ' - ' Formula - ((N1 - N0) / F) / (D1 - D0), where the numerator (N) - ' represents the number of ticks counted during the last - ' sample interval, F represents the frequency of the ticks, - ' and the denominator (D) represents the number of operations - ' completed during the last sample interval. - ' - ' Average - ((Nx - N0) / F) / (Dx - D0) - ' - ' Example - PhysicalDisk\ Avg. Disk sec/Transfer - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - Private Shared Function MyComputeCounterValue( _ - s0 As CounterSample, _ - s1 As CounterSample) As Single - Dim n1 As Int64 = s1.RawValue - Dim n0 As Int64 = s0.RawValue - Dim f As Decimal = CType(s1.SystemFrequency, Decimal) - Dim d1 As Int64 = s1.BaseValue - Dim d0 As Int64 = s0.BaseValue - - Dim numerator As Double = System.Convert.ToDouble(n1 - n0) - Dim denominator As Double = System.Convert.ToDouble(d1 - d0) - Dim counterValue As Single = CType(numerator, Single) - counterValue = counterValue / CType(f, Single) - counterValue = counterValue / CType(denominator, Single) - - Return counterValue - End Function - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(s As CounterSample) - Console.WriteLine("+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Cr _ - + ControlChars.Lf) - Console.WriteLine((" BaseValue = " _ - + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + _ - s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + _ - s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + _ - s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + _ - s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + _ - s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + _ - s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + _ - s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub - - _ - Public Shared Function _ - QueryPerformanceCounter(ByRef value As Long) As Boolean - End Function - -End Class - -' - -#Else - -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.InteropServices -Imports System.Runtime.Versioning - - -Public Class App - - Private Const categoryName As String = "AverageTimer32SampleCategory" - Private Const counterName As String = "AverageTimer32Sample" - Private Const baseCounterName As String = "AverageTimer32SampleBase" - - Private Shared PC As PerformanceCounter - Private Shared BPC As PerformanceCounter - - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - SetupCategory() - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End Sub - - - Private Shared Function SetupCategory() As Boolean - - If Not PerformanceCounterCategory.Exists(categoryName) Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim averageTimer32 As New CounterCreationData() - averageTimer32.CounterType = PerformanceCounterType.AverageTimer32 - averageTimer32.CounterName = counterName - CCDC.Add(averageTimer32) - - ' Add the base counter. - Dim averageTimer32Base As New CounterCreationData() - averageTimer32Base.CounterType = PerformanceCounterType.AverageBase - averageTimer32Base.CounterName = baseCounterName - CCDC.Add(averageTimer32Base) - - ' Create the category. - PerformanceCounterCategory.Create( _ - categoryName, _ - "Demonstrates usage of the AverageTimer32 performance counter type", _ - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Console.WriteLine("Category created - " + categoryName) - - Return True - Else - Console.WriteLine(("Category exists - " + _ - categoryName)) - Return False - End If - End Function - - - Private Shared Sub CreateCounters() - ' Create the counters. - PC = New PerformanceCounter(categoryName, _ - counterName, False) - - BPC = New PerformanceCounter(categoryName, _ - baseCounterName, False) - - PC.RawValue = 0 - BPC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Loop for the samples. - Dim i As Integer - For i = 0 To 9 - - PC.RawValue = Stopwatch.GetTimeStamp() - - BPC.IncrementBy(10) - - System.Threading.Thread.Sleep(1000) - Console.WriteLine(("Next value = " + PC.NextValue().ToString())) - samplesList.Add(PC.NextSample()) - Next i - End Sub - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - Dim sample1 As CounterSample - Dim sample2 As CounterSample - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - sample1 = CType(samplesList(i), CounterSample) - sample2 = CType(samplesList(i + 1), CounterSample) - OutputSample(sample1) - OutputSample(sample2) - - ' Use .NET to calculate the counter value. - Console.WriteLine((".NET computed counter value = " _ - + CounterSample.Calculate(sample1, sample2).ToString())) - - ' Calculate the counter value manually. - Console.WriteLine(("My computed counter value = " _ - + MyComputeCounterValue(sample1, sample2).ToString())) - - Next i - End Sub - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - ' PERF_AVERAGE_TIMER - ' Description - This counter type measures the time it takes, on - ' average, to complete a process or operation. Counters of this - ' type display a ratio of the total elapsed time of the sample - ' interval to the number of processes or operations completed - ' during that time. This counter type measures time in ticks - ' of the system clock. The F variable represents the number of - ' ticks per second. The value of F is factored into the equation - ' so that the result can be displayed in seconds. - ' - ' Generic type - Average - ' - ' Formula - ((N1 - N0) / F) / (D1 - D0), where the numerator (N) - ' represents the number of ticks counted during the last - ' sample interval, F represents the frequency of the ticks, - ' and the denominator (D) represents the number of operations - ' completed during the last sample interval. - ' - ' Average - ((Nx - N0) / F) / (Dx - D0) - ' - ' Example - PhysicalDisk\ Avg. Disk sec/Transfer - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//+++++++ - Private Shared Function MyComputeCounterValue( _ - ByVal s0 As CounterSample, _ - ByVal s1 As CounterSample) As Single - Dim n1 As Int64 = s1.RawValue - Dim n0 As Int64 = s0.RawValue - Dim f As Decimal = CType(s1.SystemFrequency, Decimal) - Dim d1 As Int64 = s1.BaseValue - Dim d0 As Int64 = s0.BaseValue - - Dim numerator As Double = System.Convert.ToDouble(n1 - n0) - Dim denominator As Double = System.Convert.ToDouble(d1 - d0) - Dim counterValue As Single = CType(numerator, Single) - counterValue = counterValue / CType(f, Single) - counterValue = counterValue / CType(denominator, Single) - - Return counterValue - End Function - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine("+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Cr _ - + ControlChars.Lf) - Console.WriteLine((" CounterType = " + _ - s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + _ - s.RawValue.ToString())) - Console.WriteLine((" BaseValue = " _ - + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + _ - s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + _ - s.CounterTimeStamp.ToString())) - Console.WriteLine((" SystemFrequency = " + _ - s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + _ - s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + _ - s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub - - -End Class - -' - -#End If diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/elapsedtime.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/elapsedtime.vb deleted file mode 100644 index abcbfba55d23e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/elapsedtime.vb +++ /dev/null @@ -1,237 +0,0 @@ -' Notice that the sample is conditionally compiled for Everett vs. -' Whidbey builds. Whidbey introduced new APIs that are not available -' in Everett. Snippet IDs do not overlap between Whidbey and Everett; -' Snippet #1 is Everett, Snippet #2 and #3 are Whidbey. - -#If BELOW_WHIDBEY_BUILD Then - - ' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.InteropServices - -Public Class App2 - Private Shared PC As PerformanceCounter - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the App2lication that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - End If - - End Sub - - - Private Shared Function SetupCategory() As Boolean - If Not PerformanceCounterCategory.Exists("ElapsedTimeSampleCategory") Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim ETimeData As New CounterCreationData() - ETimeData.CounterType = PerformanceCounterType.ElapsedTime - ETimeData.CounterName = "ElapsedTimeSample" - CCDC.Add(ETimeData) - - ' Create the category. - PerformanceCounterCategory.Create("ElapsedTimeSampleCategory", _ - "Demonstrates usage of the ElapsedTime performance counter type.", CCDC) - - Return True - Else - Console.WriteLine("Category exists - ElapsedTimeSampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counter. - PC = New PerformanceCounter("ElapsedTimeSampleCategory", _ - "ElapsedTimeSample", False) - End Sub - - - - Private Shared Sub CollectSamples(samplesList As ArrayList) - - Dim pcValue As Long - Dim Start As DateTime - - ' Initialize the counter. - QueryPerformanceCounter(pcValue) - PC.RawValue = pcValue - Start = DateTime.Now - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 999 - ' Output the values. - If j Mod 10 = 9 Then - Console.WriteLine(("NextValue() = " _ - + PC.NextValue().ToString())) - Console.WriteLine(("Actual elapsed time = " _ - + DateTime.Now.Subtract(Start).ToString())) - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - End If - - ' reset the counter on 100th iteration. - If j Mod 100 = 0 Then - QueryPerformanceCounter(pcValue) - PC.RawValue = pcValue - Start = DateTime.Now - End If - System.Threading.Thread.Sleep(50) - Next j - - Console.WriteLine(("Elapsed time = " + _ - DateTime.Now.Subtract(Start).ToString())) - End Sub - - - Private Shared Sub OutputSample(s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++") - - Console.WriteLine("Sample values - " + ControlChars.Cr _ - + ControlChars.Lf) - Console.WriteLine((" BaseValue = " _ - + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + _ - s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + _ - s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + _ - s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + _ - s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + _ - s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + _ - s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + _ - s.TimeStamp100nSec.ToString())) - - Console.WriteLine("+++++++") - End Sub - - ' Reads the counter information to enable setting the RawValue. - _ - Public Shared Function _ - QueryPerformanceCounter(ByRef value As Long) As Boolean - End Function -End Class -' - -#Else -' - -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.InteropServices -Imports System.Runtime.Versioning - - -Public Class App2 - - Public Shared Sub Main() - CollectSamples() - End Sub - - Private Shared Sub CollectSamples() - - Dim categoryName As String = "ElapsedTimeSampleCategory" - Dim counterName As String = "ElapsedTimeSample" - - If Not PerformanceCounterCategory.Exists(categoryName) Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim ETimeData As New CounterCreationData() - ETimeData.CounterType = PerformanceCounterType.ElapsedTime - ETimeData.CounterName = counterName - CCDC.Add(ETimeData) - - ' Create the category. - PerformanceCounterCategory.Create(categoryName, - "Demonstrates ElapsedTime performance counter usage.", - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Else - Console.WriteLine("Category exists - {0}", categoryName) - End If - - ' - ' Create the counter. - Dim PC As PerformanceCounter - PC = New PerformanceCounter(categoryName, counterName, False) - - ' Initialize the counter. - PC.RawValue = Stopwatch.GetTimestamp() - ' - - Dim Start As DateTime = DateTime.Now - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - ' Output the values. - If j Mod 10 = 9 Then - Console.WriteLine(("NextValue() = " _ - + PC.NextValue().ToString())) - Console.WriteLine(("Actual elapsed time = " _ - + DateTime.Now.Subtract(Start).ToString())) - OutputSample(PC.NextSample()) - End If - - ' Reset the counter every 20th iteration. - If j Mod 20 = 0 Then - PC.RawValue = Stopwatch.GetTimestamp() - Start = DateTime.Now - End If - System.Threading.Thread.Sleep(50) - Next j - - Console.WriteLine(("Elapsed time = " + - DateTime.Now.Subtract(Start).ToString())) - End Sub - - - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++") - - Console.WriteLine("Sample values - " + ControlChars.Cr _ - + ControlChars.Lf) - Console.WriteLine((" BaseValue = " _ - + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + - s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + - s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + - s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + - s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + - s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + - s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + - s.TimeStamp100nSec.ToString())) - - Console.WriteLine("+++++++") - End Sub -End Class -' - -#End If diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems32.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems32.vb deleted file mode 100644 index c075e12f5fb77..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems32.vb +++ /dev/null @@ -1,131 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class NumberOfItems64 - - Private Shared PC As PerformanceCounter - - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the application that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - End Sub - - - Private Shared Function SetupCategory() As Boolean - If Not PerformanceCounterCategory.Exists("NumberOfItems32SampleCategory") Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim NOI64 As New CounterCreationData() - NOI64.CounterType = PerformanceCounterType.NumberOfItems64 - NOI64.CounterName = "NumberOfItems32Sample" - CCDC.Add(NOI64) - - ' Create the category. - PerformanceCounterCategory.Create("NumberOfItems32SampleCategory", _ - "Demonstrates usage of the NumberOfItems32 performance counter type.", _ - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Return True - Else - Console.WriteLine("Category exists - NumberOfItems32SampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counter. - PC = New PerformanceCounter("NumberOfItems32SampleCategory", "NumberOfItems32Sample", False) - - PC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - Dim value As Integer = r.Next(1, 10) - Console.Write(j.ToString() + " = " + value.ToString()) - - PC.IncrementBy(value) - - If j Mod 10 = 9 Then - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - - - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - Next i - End Sub - - - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim counterValue As [Single] = s1.RawValue - Return counterValue - End Function 'MyComputeCounterValue - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine(" BaseValue = " + s.BaseValue.ToString()) - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency.ToString()) - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp.ToString()) - Console.WriteLine(" CounterType = " + s.CounterType.ToString()) - Console.WriteLine(" RawValue = " + s.RawValue.ToString()) - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency.ToString()) - Console.WriteLine(" TimeStamp = " + s.TimeStamp.ToString()) - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString()) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class - - -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems64.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems64.vb deleted file mode 100644 index 7708ef509b933..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/numberofitems64.vb +++ /dev/null @@ -1,126 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class NumberOfItems64_1 - - Private Shared PC As PerformanceCounter - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the application that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - - End Sub - - - Private Shared Function SetupCategory() As Boolean - If Not PerformanceCounterCategory.Exists("NumberOfItems64SampleCategory") Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim NOI64 As New CounterCreationData() - NOI64.CounterType = PerformanceCounterType.NumberOfItems64 - NOI64.CounterName = "NumberOfItems64Sample" - CCDC.Add(NOI64) - - ' Create the category. - PerformanceCounterCategory.Create("NumberOfItems64SampleCategory", - "Demonstrates usage of the NumberOfItems64_1 performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Return True - Else - Console.WriteLine("Category exists - NumberOfItems64SampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counters. - PC = New PerformanceCounter("NumberOfItems64SampleCategory", "NumberOfItems64Sample", False) - - PC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - Dim value As Integer = r.Next(1, 10) - Console.Write((j.ToString() + " = " + value.ToString())) - - PC.IncrementBy(value) - - If j Mod 10 = 9 Then - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - Next i - End Sub - - - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim counterValue As [Single] = s1.RawValue - Return counterValue - End Function 'MyComputeCounterValue - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine((" BaseValue = " + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/program.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/program.vb deleted file mode 100644 index 029e8b13ea92a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/program.vb +++ /dev/null @@ -1,153 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -' Provides a SampleFraction counter to measure the percentage of the user processor -' time for this process to total processor time for the process. - - -Public Class App3 - - Private Shared perfCounter As PerformanceCounter - Private Shared basePerfCounter As PerformanceCounter - Private Shared thisProcess As Process = Process.GetCurrentProcess() - - - Public Shared Sub Main() - - Dim samplesList As New ArrayList() - - ' If the category does not exist, create the category and exit. - ' Performance counters should not be created and immediately used. - ' There is a latency time to enable the counters, they should be created - ' prior to executing the application that uses the counters. - ' Execute this sample a second time to use the category. - If SetupCategory() Then - Return - End If - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - - End Sub - - - - Private Shared Function SetupCategory() As Boolean - If Not PerformanceCounterCategory.Exists("SampleFractionCategory") Then - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim sampleFraction As New CounterCreationData() - sampleFraction.CounterType = PerformanceCounterType.SampleFraction - sampleFraction.CounterName = "SampleFractionSample" - CCDC.Add(sampleFraction) - - ' Add the base counter. - Dim sampleFractionBase As New CounterCreationData() - sampleFractionBase.CounterType = PerformanceCounterType.SampleBase - sampleFractionBase.CounterName = "SampleFractionSampleBase" - CCDC.Add(sampleFractionBase) - - ' Create the category. - PerformanceCounterCategory.Create("SampleFractionCategory", "Demonstrates usage of the SampleFraction performance counter type.", PerformanceCounterCategoryType.SingleInstance, CCDC) - - Return True - Else - Console.WriteLine("Category exists - SampleFractionCategory") - Return False - End If - - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counters. - perfCounter = New PerformanceCounter("SampleFractionCategory", "SampleFractionSample", False) - - - basePerfCounter = New PerformanceCounter("SampleFractionCategory", "SampleFractionSampleBase", False) - - - perfCounter.RawValue = thisProcess.UserProcessorTime.Ticks - basePerfCounter.RawValue = thisProcess.TotalProcessorTime.Ticks - - End Sub - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - perfCounter.IncrementBy(thisProcess.UserProcessorTime.Ticks) - - basePerfCounter.IncrementBy(thisProcess.TotalProcessorTime.Ticks) - - If j Mod 10 = 9 Then - OutputSample(perfCounter.NextSample()) - samplesList.Add(perfCounter.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - - End Sub - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample))) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample))) - Next i - - End Sub - - - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - ' Description - This counter type provides A percentage counter that shows the - ' average ratio of user proccessor time to total processor time during the last - ' two sample intervals. - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim numerator As [Single] = CType(s1.RawValue, [Single]) - CType(s0.RawValue, [Single]) - Dim denomenator As [Single] = CType(s1.BaseValue, [Single]) - CType(s0.BaseValue, [Single]) - Dim counterValue As [Single] = 100 * (numerator / denomenator) - Return counterValue - - End Function 'MyComputeCounterValue - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(vbCr + vbLf + "+++++++++++") - Console.WriteLine("Sample values - " + vbCr + vbLf) - Console.WriteLine(" BaseValue = " + s.BaseValue) - Console.WriteLine(" CounterFrequency = " + s.CounterFrequency) - Console.WriteLine(" CounterTimeStamp = " + s.CounterTimeStamp) - Console.WriteLine(" CounterType = " + s.CounterType) - Console.WriteLine(" RawValue = " + s.RawValue) - Console.WriteLine(" SystemFrequency = " + s.SystemFrequency) - Console.WriteLine(" TimeStamp = " + s.TimeStamp) - Console.WriteLine(" TimeStamp100nSec = " + s.TimeStamp100nSec) - Console.WriteLine("++++++++++++++++++++++") - - End Sub -End Class -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond32.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond32.vb deleted file mode 100644 index e4b597c0e5a23..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond32.vb +++ /dev/null @@ -1,151 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class App4 - Private Shared PC As PerformanceCounter - - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the App4lication that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - End Sub - - - Private Shared Function SetupCategory() As Boolean - - If Not PerformanceCounterCategory.Exists("RateOfCountsPerSecond32SampleCategory") Then - - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim rateOfCounts32 As New CounterCreationData() - rateOfCounts32.CounterType = PerformanceCounterType.RateOfCountsPerSecond32 - rateOfCounts32.CounterName = "RateOfCountsPerSecond32Sample" - CCDC.Add(rateOfCounts32) - - ' Create the category. - PerformanceCounterCategory.Create("RateOfCountsPerSecond32SampleCategory", _ - "Demonstrates usage of the RateOfCountsPerSecond32 performance counter type.", _ - PerformanceCounterCategoryType.SingleInstance, CCDC) - Return True - Else - Console.WriteLine("Category exists - RateOfCountsPerSecond32SampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counter. - PC = New PerformanceCounter("RateOfCountsPerSecond32SampleCategory", "RateOfCountsPerSecond32Sample", False) - - PC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Initialize the performance counter. - PC.NextSample() - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - Dim value As Integer = r.Next(1, 10) - PC.IncrementBy(value) - Console.Write((j.ToString() + " = " + value.ToString())) - - If j Mod 10 = 9 Then - Console.WriteLine(("; NextValue() = " + PC.NextValue().ToString())) - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - Next i - End Sub - - - - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - ' PERF_COUNTER_COUNTER - ' Description - This counter type shows the average number of operations completed - ' during each second of the sample interval. Counters of this type - ' measure time in ticks of the system clock. The F variable represents - ' the number of ticks per second. The value of F is factored into the - ' equation so that the result can be displayed in seconds. - ' - ' Generic type - Difference - ' - ' Formula - (N1 - N0) / ( (D1 - D0) / F), where the numerator (N) represents the number - ' of operations performed during the last sample interval, the denominator - ' (D) represents the number of ticks elapsed during the last sample - ' interval, and F is the frequency of the ticks. - ' - ' Average - (Nx - N0) / ((Dx - D0) / F) - ' - ' Example - System\ File Read Operations/sec - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim numerator As [Single] = CType(s1.RawValue - s0.RawValue, [Single]) - Dim denomenator As [Single] = CType(s1.TimeStamp - s0.TimeStamp, [Single]) / CType(s1.SystemFrequency, [Single]) - Dim counterValue As [Single] = numerator / denomenator - Return counterValue - End Function 'MyComputeCounterValue - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine((" BaseValue = " + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class - -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond64.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond64.vb deleted file mode 100644 index ea2d3f1f8f753..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rateofcountspersecond64.vb +++ /dev/null @@ -1,151 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class App5 - Private Shared PC As PerformanceCounter - - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the App5lication that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - End Sub - - - Private Shared Function SetupCategory() As Boolean - - - If Not PerformanceCounterCategory.Exists("RateOfCountsPerSecond64SampleCategory") Then - - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim rateOfCounts64 As New CounterCreationData() - rateOfCounts64.CounterType = PerformanceCounterType.RateOfCountsPerSecond64 - rateOfCounts64.CounterName = "RateOfCountsPerSecond64Sample" - CCDC.Add(rateOfCounts64) - - ' Create the category. - PerformanceCounterCategory.Create("RateOfCountsPerSecond64SampleCategory", _ - "Demonstrates usage of the RateOfCountsPerSecond64 performance counter type.", _ - PerformanceCounterCategoryType.SingleInstance, CCDC) - Return True - Else - Console.WriteLine("Category exists - RateOfCountsPerSecond64SampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counter. - PC = New PerformanceCounter("RateOfCountsPerSecond64SampleCategory", "RateOfCountsPerSecond64Sample", False) - - PC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Initialize the performance counter. - PC.NextSample() - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - - Dim value As Integer = r.Next(1, 10) - PC.IncrementBy(value) - Console.Write((j.ToString() + " = " + value.ToString())) - - If j Mod 10 = 9 Then - Console.WriteLine(("; NextValue() = " + PC.NextValue().ToString())) - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To (samplesList.Count - 1) - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - OutputSample(CType(samplesList((i + 1)), CounterSample)) - - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + _ - CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + _ - MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString()) - Next i - End Sub - - - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - ' PERF_COUNTER_COUNTER - ' Description - This counter type shows the average number of operations completed - ' during each second of the sample interval. Counters of this type - ' measure time in ticks of the system clock. The F variable represents - ' the number of ticks per second. The value of F is factored into the - ' equation so that the result can be displayed in seconds. - ' - ' Generic type - Difference - ' - ' Formula - (N1 - N0) / ( (D1 - D0) / F), where the numerator (N) represents the number - ' of operations performed during the last sample interval, the denominator - ' (D) represents the number of ticks elapsed during the last sample - ' interval, and F is the frequency of the ticks. - ' - ' Average - (Nx - N0) / ((Dx - D0) / F) - ' - ' Example - System\ File Read Operations/sec - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single] - Dim numerator As [Single] = CType(s1.RawValue - s0.RawValue, [Single]) - Dim denomenator As [Single] = CType(s1.TimeStamp - s0.TimeStamp, [Single]) / CType(s1.SystemFrequency, [Single]) - Dim counterValue As [Single] = numerator / denomenator - Return counterValue - End Function 'MyComputeCounterValue - - - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine((" BaseValue = " + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class - -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rawfraction.vb b/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rawfraction.vb deleted file mode 100644 index 3c0595ecf34ee..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Diagnostics/PerformanceCounterType/Overview/vb/rawfraction.vb +++ /dev/null @@ -1,162 +0,0 @@ -' -Imports System.Collections -Imports System.Collections.Specialized -Imports System.Diagnostics -Imports System.Runtime.Versioning - - -Public Class App6 - Private Shared PC As PerformanceCounter - Private Shared BPC As PerformanceCounter - - Public Shared Sub Main() - Dim samplesList As New ArrayList() - - 'If the category does not exist, create the category and exit. - 'Performance counters should not be created and immediately used. - 'There is a latency time to enable the counters, they should be created - 'prior to executing the App6lication that uses the counters. - 'Execute this sample a second time to use the counters. - If Not (SetupCategory()) Then - CreateCounters() - CollectSamples(samplesList) - CalculateResults(samplesList) - End If - - End Sub - - Private Shared Function SetupCategory() As Boolean - - - If Not PerformanceCounterCategory.Exists("RawFractionSampleCategory") Then - - - Dim CCDC As New CounterCreationDataCollection() - - ' Add the counter. - Dim rf As New CounterCreationData() - rf.CounterType = PerformanceCounterType.RawFraction - rf.CounterName = "RawFractionSample" - CCDC.Add(rf) - - ' Add the base counter. - Dim rfBase As New CounterCreationData() - rfBase.CounterType = PerformanceCounterType.RawBase - rfBase.CounterName = "RawFractionSampleBase" - CCDC.Add(rfBase) - - ' Create the category. - PerformanceCounterCategory.Create("RawFractionSampleCategory", - "Demonstrates usage of the RawFraction performance counter type.", - PerformanceCounterCategoryType.SingleInstance, CCDC) - - Return True - Else - Console.WriteLine("Category exists - RawFractionSampleCategory") - Return False - End If - End Function 'SetupCategory - - - Private Shared Sub CreateCounters() - ' Create the counters. - PC = New PerformanceCounter("RawFractionSampleCategory", "RawFractionSample", False) - - BPC = New PerformanceCounter("RawFractionSampleCategory", "RawFractionSampleBase", False) - - PC.RawValue = 0 - BPC.RawValue = 0 - End Sub - - - Private Shared Sub CollectSamples(ByVal samplesList As ArrayList) - - Dim r As New Random(DateTime.Now.Millisecond) - - ' Initialize the performance counter. - PC.NextSample() - - ' Loop for the samples. - Dim j As Integer - For j = 0 To 99 - Dim value As Integer = r.Next(1, 10) - Console.Write((j.ToString() + " = " + value.ToString())) - - ' Increment the base every time, because the counter measures the number - ' of high hits (raw fraction value) against all the hits (base value). - BPC.Increment() - - ' Get the % of samples that are 9 or 10 out of all the samples taken. - If value >= 9 Then - PC.Increment() - End If - ' Copy out the next value every ten times around the loop. - If j Mod 10 = 9 Then - Console.WriteLine(("; NextValue() = " + PC.NextValue().ToString())) - OutputSample(PC.NextSample()) - samplesList.Add(PC.NextSample()) - Else - Console.WriteLine() - End If - System.Threading.Thread.Sleep(50) - Next j - End Sub - - - - Private Shared Sub CalculateResults(ByVal samplesList As ArrayList) - Dim i As Integer - For i = 0 To samplesList.Count - 1 - ' Output the sample. - OutputSample(CType(samplesList(i), CounterSample)) - - ' Use .NET to calculate the counter value. - Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample)).ToString()) - - ' Calculate the counter value manually. - Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample)).ToString()) - Next i - End Sub - - - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - ' Formula from MSDN - - ' Description - This counter type shows the ratio of a subset to its set as a percentage. - ' For example, it compares the number of bytes in use on a disk to the - ' total number of bytes on the disk. Counters of this type display the - ' current percentage only, not an average over time. - ' - ' Generic type - Instantaneous, Percentage - ' Formula - (N0 / D0), where D represents a measured attribute and N represents one - ' component of that attribute. - ' - ' Average - SUM (N / D) /x - ' Example - Paging File\% Usage Peak - '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++ - Private Shared Function MyComputeCounterValue(ByVal rfSample As CounterSample) As [Single] - Dim numerator As [Single] = CType(rfSample.RawValue, [Single]) - Dim denomenator As [Single] = CType(rfSample.BaseValue, [Single]) - Dim counterValue As [Single] = numerator / denomenator * 100 - Return counterValue - End Function 'MyComputeCounterValue - - - ' Output information about the counter sample. - Private Shared Sub OutputSample(ByVal s As CounterSample) - Console.WriteLine("+++++++++++") - Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr) - Console.WriteLine((" BaseValue = " + s.BaseValue.ToString())) - Console.WriteLine((" CounterFrequency = " + s.CounterFrequency.ToString())) - Console.WriteLine((" CounterTimeStamp = " + s.CounterTimeStamp.ToString())) - Console.WriteLine((" CounterType = " + s.CounterType.ToString())) - Console.WriteLine((" RawValue = " + s.RawValue.ToString())) - Console.WriteLine((" SystemFrequency = " + s.SystemFrequency.ToString())) - Console.WriteLine((" TimeStamp = " + s.TimeStamp.ToString())) - Console.WriteLine((" TimeStamp100nSec = " + s.TimeStamp100nSec.ToString())) - Console.WriteLine("++++++++++++++++++++++") - End Sub -End Class - - - -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Class1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Class1.cs deleted file mode 100644 index 73e41ac56aba0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Class1.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Drawing; -using System.Collections; -using System.Xml; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; - -public class Form1 : Form -{ - [STAThread] - public static void Main() - { - Application.EnableVisualStyles(); - Application.Run(new Form1()); - } - - Pen myPen = Pens.Red; - - // 0659fe00-9e0c-41c4-9118-016f2404c905 - // Matrix Representation of Transformations - - public void Method11() - { - Graphics myGraphics = this.CreateGraphics(); - // - Matrix myMatrix = new Matrix(); - myMatrix.Rotate(30); - myMatrix.Scale(1, 2, MatrixOrder.Append); - myMatrix.Translate(5, 0, MatrixOrder.Append); - // - } - // b601d66d-d572-4f11-9d2e-92f0dc8893f3 - // Global and Local Transformations - - public void Method21() - { - Graphics myGraphics = this.CreateGraphics(); - // - myGraphics.DrawEllipse(myPen, 0, 0, 100, 50); - myGraphics.ScaleTransform(1, 0.5f); - myGraphics.TranslateTransform(50, 0, MatrixOrder.Append); - myGraphics.RotateTransform(30, MatrixOrder.Append); - myGraphics.DrawEllipse(myPen, 0, 0, 100, 50); - // - } - public void Method22() - { - Graphics myGraphics = this.CreateGraphics(); - GraphicsPath myGraphicsPath = new GraphicsPath(); - // - Matrix myMatrix = new Matrix(); - myMatrix.Rotate(45); - myGraphicsPath.Transform(myMatrix); - myGraphics.DrawRectangle(myPen, 10, 10, 100, 50); - myGraphics.DrawPath(myPen, myGraphicsPath); - // - } - public void Method23() - { - Graphics myGraphics = this.CreateGraphics(); - // - Matrix myMatrix = new Matrix(1, 0, 0, -1, 0, 0); - myGraphics.Transform = myMatrix; - myGraphics.TranslateTransform(200, 150, MatrixOrder.Append); - // - } - public void Method24() - { - Graphics myGraphics = this.CreateGraphics(); - SolidBrush mySolidBrush1 = new SolidBrush(Color.Red); - SolidBrush mySolidBrush2 = new SolidBrush(Color.Black); - // - // Create the path. - GraphicsPath myGraphicsPath = new GraphicsPath(); - Rectangle myRectangle = new Rectangle(0, 0, 60, 60); - myGraphicsPath.AddRectangle(myRectangle); - - // Fill the path on the new coordinate system. - // No local transformation - myGraphics.FillPath(mySolidBrush1, myGraphicsPath); - - // Set the local transformation of the GraphicsPath object. - Matrix myPathMatrix = new Matrix(); - myPathMatrix.Scale(2, 1); - myPathMatrix.Rotate(30, MatrixOrder.Append); - myGraphicsPath.Transform(myPathMatrix); - - // Fill the transformed path on the new coordinate system. - myGraphics.FillPath(mySolidBrush2, myGraphicsPath); - // - } - // c61ff50a-eb1d-4e6c-83cd-f7e9764cfa9f - // Types of Coordinate Systems - - public void Method31() - { - Graphics myGraphics = this.CreateGraphics(); - // - myGraphics.TranslateTransform(100, 50); - myGraphics.DrawLine(myPen, 0, 0, 160, 80); - // - } - public void Method32() - { - Graphics myGraphics = this.CreateGraphics(); - // - myGraphics.PageUnit = GraphicsUnit.Inch; - myGraphics.DrawLine(myPen, 0, 0, 2, 1); - // - } - public void Method33() - { - Graphics myGraphics = this.CreateGraphics(); - // - Pen myPen = new Pen(Color.Black, 1 / myGraphics.DpiX); - // - } - public void Method34() - { - Graphics myGraphics = this.CreateGraphics(); - // - myGraphics.TranslateTransform(2, 0.5f); - myGraphics.PageUnit = GraphicsUnit.Inch; - myGraphics.DrawLine(myPen, 0, 0, 2, 1); - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Project.csproj deleted file mode 100644 index 78bf0e843cd9a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/csharp/Project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - WinExe - net10.0-windows - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Class1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Class1.vb deleted file mode 100644 index 6a43c7576404e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Class1.vb +++ /dev/null @@ -1,128 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Windows.Forms -Imports System.Drawing -Imports System.Collections -Imports System.Xml -Imports System.Drawing.Imaging -Imports System.Drawing.Drawing2D - -Public Class Form1 - Inherits Form - - _ - Public Shared Sub Main() - Application.EnableVisualStyles() - Application.Run(New Form1()) - End Sub - - Dim myPen As Pen = Pens.Black - ' 0659fe00-9e0c-41c4-9118-016f2404c905 - ' Matrix Representation of Transformations - Public Sub Method11() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - Dim myMatrix As New Matrix() - myMatrix.Rotate(30) - myMatrix.Scale(1, 2, MatrixOrder.Append) - myMatrix.Translate(5, 0, MatrixOrder.Append) - - ' - End Sub - ' b601d66d-d572-4f11-9d2e-92f0dc8893f3 - ' Global and Local Transformations - Public Sub Method21() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - myGraphics.DrawEllipse(myPen, 0, 0, 100, 50) - myGraphics.ScaleTransform(1, 0.5F) - myGraphics.TranslateTransform(50, 0, MatrixOrder.Append) - myGraphics.RotateTransform(30, MatrixOrder.Append) - myGraphics.DrawEllipse(myPen, 0, 0, 100, 50) - - ' - End Sub - Public Sub Method22() - Dim myGraphics As Graphics = Me.CreateGraphics() - Dim myGraphicsPath As New GraphicsPath() - ' - Dim myMatrix As New Matrix() - myMatrix.Rotate(45) - myGraphicsPath.Transform(myMatrix) - myGraphics.DrawRectangle(myPen, 10, 10, 100, 50) - myGraphics.DrawPath(myPen, myGraphicsPath) - - ' - End Sub - Public Sub Method23() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - Dim myMatrix As New Matrix(1, 0, 0, -1, 0, 0) - myGraphics.Transform = myMatrix - myGraphics.TranslateTransform(200, 150, MatrixOrder.Append) - - ' - End Sub - Public Sub Method24() - Dim myGraphics As Graphics = Me.CreateGraphics() - Dim mySolidBrush1 As New SolidBrush(Color.Red) - Dim mySolidBrush2 As New SolidBrush(Color.Black) - - ' - ' Create the path. - Dim myGraphicsPath As New GraphicsPath() - Dim myRectangle As New Rectangle(0, 0, 60, 60) - myGraphicsPath.AddRectangle(myRectangle) - - ' Fill the path on the new coordinate system. - ' No local transformation - myGraphics.FillPath(mySolidBrush1, myGraphicsPath) - - ' Set the local transformation of the GraphicsPath object. - Dim myPathMatrix As New Matrix() - myPathMatrix.Scale(2, 1) - myPathMatrix.Rotate(30, MatrixOrder.Append) - myGraphicsPath.Transform(myPathMatrix) - - ' Fill the transformed path on the new coordinate system. - myGraphics.FillPath(mySolidBrush2, myGraphicsPath) - - ' - End Sub - ' c61ff50a-eb1d-4e6c-83cd-f7e9764cfa9f - ' Types of Coordinate Systems - Public Sub Method31() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - myGraphics.TranslateTransform(100, 50) - myGraphics.DrawLine(myPen, 0, 0, 160, 80) - - ' - End Sub - Public Sub Method32() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - myGraphics.PageUnit = GraphicsUnit.Inch - myGraphics.DrawLine(myPen, 0, 0, 2, 1) - - ' - End Sub - Public Sub Method33() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - Dim myPen As New Pen(Color.Black, 1 / myGraphics.DpiX) - - ' - End Sub - Public Sub Method34() - Dim myGraphics As Graphics = Me.CreateGraphics() - ' - myGraphics.TranslateTransform(2, 0.5F) - myGraphics.PageUnit = GraphicsUnit.Inch - myGraphics.DrawLine(myPen, 0, 0, 2, 1) - - ' - End Sub -End Class - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Project.vbproj deleted file mode 100644 index c86794b1506cc..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Drawing.Drawing2D/Matrix/Overview/vb/Project.vbproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - WinExe - net48 - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/program.cs b/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/program.cs deleted file mode 100644 index c33c081ff4002..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/csharp/program.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Dynamic; -using System.ComponentModel; - -namespace N1 -{ - class Program - { - static void Test(string[] args) - { - // - dynamic sampleObject = new ExpandoObject(); - // - - // - sampleObject.test = "Dynamic Property"; - Console.WriteLine(sampleObject.test); - Console.WriteLine(sampleObject.test.GetType()); - // This code example produces the following output: - // Dynamic Property - // System.String - // - - // - sampleObject.number = 10; - sampleObject.Increment = (Action)(() => { sampleObject.number++; }); - - // Before calling the Increment method. - Console.WriteLine(sampleObject.number); - - sampleObject.Increment(); - - // After calling the Increment method. - Console.WriteLine(sampleObject.number); - // This code example produces the following output: - // 10 - // 11 - // - - // - dynamic employee = new ExpandoObject(); - employee.Name = "John Smith"; - employee.Age = 33; - - foreach (var property in (IDictionary)employee) - { - Console.WriteLine(property.Key + ": " + property.Value); - } - // This code example produces the following output: - // Name: John Smith - // Age: 33 - // - } - - static void Test2() - { - // - dynamic employee = new ExpandoObject(); - employee.Name = "John Smith"; - ((IDictionary)employee).Remove("Name"); - // - } - } -} - -namespace n2 -{ - // - class Program - { - static void Main(string[] args) - { - dynamic employee, manager; - - employee = new ExpandoObject(); - employee.Name = "John Smith"; - employee.Age = 33; - - manager = new ExpandoObject(); - manager.Name = "Allison Brown"; - manager.Age = 42; - manager.TeamSize = 10; - - WritePerson(manager); - WritePerson(employee); - } - private static void WritePerson(dynamic person) - { - Console.WriteLine($"{person.Name} is {person.Age} years old."); - // The following statement causes an exception - // if you pass the employee object. - // Console.WriteLine($"Manages {person.TeamSize} people"); - } - } - // This code example produces the following output: - // John Smith is 33 years old. - // Allison Brown is 42 years old. - // -} - -namespace n3 -{ - // - // Add "using System.ComponentModel;" line - // to the beginning of the file. - class Program - { - static void Test() - { - dynamic employee = new ExpandoObject(); - ((INotifyPropertyChanged)employee).PropertyChanged += - new PropertyChangedEventHandler(HandlePropertyChanges); - employee.Name = "John Smith"; - } - - private static void HandlePropertyChanges( - object sender, PropertyChangedEventArgs e) - { - Console.WriteLine($"{e.PropertyName} has changed."); - } - } - // -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/module1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/module1.vb deleted file mode 100644 index ec306ff784c67..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Dynamic/ExpandoObject/Overview/vb/module1.vb +++ /dev/null @@ -1,109 +0,0 @@ -Imports System.Dynamic -Imports System.ComponentModel -Imports System.Linq -Imports System.Collections.Generic - -Module Module2 - - Sub Test() - ' - Dim sampleObject As Object = New ExpandoObject() - ' - - ' - sampleObject.Test = "Dynamic Property" - Console.WriteLine(sampleObject.test) - Console.WriteLine(sampleObject.test.GetType()) - ' This code example produces the following output: - ' Dynamic Property - ' System.String - ' - - ' - sampleObject.Number = 10 - sampleObject.Increment = Function() sampleObject.Number + 1 - ' Before calling the Increment method. - Console.WriteLine(sampleObject.number) - - sampleObject.Increment.Invoke() - - ' After calling the Increment method. - Console.WriteLine(sampleObject.number) - ' This code example produces the following output: - ' 10 - ' 11 - ' - - ' - Dim employee As Object = New ExpandoObject() - employee.Name = "John Smith" - employee.Age = 33 - For Each member In CType(employee, IDictionary(Of String, Object)) - Console.WriteLine(member.Key & ": " & member.Value) - Next - ' This code example produces the following output: - ' Name: John Smith - ' Age: 33 - ' - End Sub - - Sub Test2() - ' - Dim employee As Object = New ExpandoObject() - employee.Name = "John Smith" - CType(employee, IDictionary(Of String, Object)).Remove("Name") - ' - End Sub - -End Module - -Module Module1 - - ' - Sub Main() - Dim employee, manager As Object - - employee = New ExpandoObject() - employee.Name = "John Smith" - employee.Age = 33 - - manager = New ExpandoObject() - manager.Name = "Allison Brown" - manager.Age = 42 - manager.TeamSize = 10 - - WritePerson(manager) - WritePerson(employee) - End Sub - - Private Sub WritePerson(ByVal person As Object) - - Console.WriteLine("{0} is {1} years old.", - person.Name, person.Age) - ' The following statement causes an exception - ' if you pass the employee object. - ' Console.WriteLine("Manages {0} people", person.TeamSize) - - End Sub - ' -End Module - -Module M3 - ' - ' Add "Imports System.ComponentModel" line - ' to the beginning of the file. - Sub Main() - Dim employee As Object = New ExpandoObject - AddHandler CType( - employee, INotifyPropertyChanged).PropertyChanged, - AddressOf HandlePropertyChanges - employee.Name = "John Smith" - End Sub - - Private Sub HandlePropertyChanges( - ByVal sender As Object, ByVal e As PropertyChangedEventArgs) - Console.WriteLine("{0} has changed.", e.PropertyName) - End Sub - ' -End Module - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Async1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Async1.cs deleted file mode 100644 index 862b15bbfd777..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Async1.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.Versioning; -using System.Threading; -using System.Threading.Tasks; - -public class Example14 -{ - public static async Task Main() - { - var tasks = new List(); - Console.WriteLine($"The current culture is {Thread.CurrentThread.CurrentCulture.Name}"); - Thread.CurrentThread.CurrentCulture = new CultureInfo("pt-BR"); - // Change the current culture to Portuguese (Brazil). - Console.WriteLine($"Current culture changed to {Thread.CurrentThread.CurrentCulture.Name}"); - Console.WriteLine($"Application thread is thread {Thread.CurrentThread.ManagedThreadId}"); - // Launch six tasks and display their current culture. - for (int ctr = 0; ctr <= 5; ctr++) - tasks.Add(Task.Run(() => - { - Console.WriteLine($"Culture of task {Task.CurrentId} on thread {Thread.CurrentThread.ManagedThreadId} is {Thread.CurrentThread.CurrentCulture.Name}"); - })); - - await Task.WhenAll(tasks.ToArray()); - } -} -// The example displays output like the following: -// The current culture is en-US -// Current culture changed to pt-BR -// Application thread is thread 9 -// Culture of task 2 on thread 11 is pt-BR -// Culture of task 1 on thread 10 is pt-BR -// Culture of task 3 on thread 11 is pt-BR -// Culture of task 5 on thread 11 is pt-BR -// Culture of task 6 on thread 11 is pt-BR -// Culture of task 4 on thread 10 is pt-BR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Get1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Get1.cs deleted file mode 100644 index f07ebd7151e4d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Get1.cs +++ /dev/null @@ -1,15 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example5 -{ - public static void Main() - { - CultureInfo culture = CultureInfo.CurrentCulture; - Console.WriteLine($"The current culture is {culture.NativeName} [{culture.Name}]"); - } -} -// The example displays output like the following: -// The current culture is English (United States) [en-US] -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/aspculture13.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/aspculture13.cs deleted file mode 100644 index f35caeb4dc867..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/aspculture13.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Globalization; -using System.Threading; - -public class Example13 -{ - public static void Main() - { - // - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture(Request13.UserLanguages[0]); - // - } -} - -public class Request13 -{ - private static string[] langs = new string[3]; - - public static string[] UserLanguages { get { return langs; } } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/changeculture11.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/changeculture11.cs deleted file mode 100644 index 699931f424220..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/changeculture11.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class Info11 : MarshalByRefObject -{ - public void ShowCurrentCulture() - { - Console.WriteLine($"Culture of {Thread.CurrentThread.Name} in application domain {AppDomain.CurrentDomain.FriendlyName}: {CultureInfo.CurrentCulture.Name}"); - } -} - -public class Example11 -{ - public static void Main() - { - Info11 inf = new Info11(); - // Set the current culture to Dutch (Netherlands). - Thread.CurrentThread.Name = "MainThread"; - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("nl-NL"); - inf.ShowCurrentCulture(); - - // Create a new application domain. - AppDomain ad = AppDomain.CreateDomain("Domain2"); - Info11 inf2 = (Info11)ad.CreateInstanceAndUnwrap(typeof(Info11).Assembly.FullName, "Info11"); - inf2.ShowCurrentCulture(); - } -} -// The example displays the following output: -// Culture of MainThread in application domain ChangeCulture1.exe: nl-NL -// Culture of MainThread in application domain Domain2: nl-NL -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/specific12.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/specific12.cs deleted file mode 100644 index 85f7b6e54eba8..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/csharp/specific12.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class Example12 -{ - public static void Main() - { - double value = 1634.92; - CultureInfo.CurrentCulture = new CultureInfo("fr-CA"); - Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.Name}"); - Console.WriteLine($"{value:C2}\n"); - - Thread.CurrentThread.CurrentCulture = new CultureInfo("fr"); - Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.Name}"); - Console.WriteLine($"{value:C2}"); - } -} -// The example displays the following output: -// Current Culture: fr-CA -// 1 634,92 $ -// -// Current Culture: fr -// 1 634,92 € -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Async1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Async1.vb deleted file mode 100644 index 1a14275abd1b4..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Async1.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Infer On -Option Strict On - -' -Imports System.Globalization -Imports System.Threading - -Module Example1 - Public Sub S1() - Dim tasks As New List(Of Task) - Console.WriteLine("The current culture is {0}", - Thread.CurrentThread.CurrentCulture.Name) - Thread.CurrentThread.CurrentCulture = New CultureInfo("pt-BR") - ' Change the current culture to Portuguese (Brazil). - Console.WriteLine("Current culture changed to {0}", - Thread.CurrentThread.CurrentCulture.Name) - Console.WriteLine("Application thread is thread {0}", - Thread.CurrentThread.ManagedThreadId) - ' Launch six tasks and display their current culture. - For ctr As Integer = 0 To 5 - tasks.Add(Task.Run(Sub() - Console.WriteLine("Culture of task {0} on thread {1} is {2}", - Task.CurrentId, - Thread.CurrentThread.ManagedThreadId, - Thread.CurrentThread.CurrentCulture.Name) - End Sub)) - Next - Task.WaitAll(tasks.ToArray()) - End Sub -End Module -' The example displays output like the following: -' The current culture is en-US -' Current culture changed to pt-BR -' Application thread is thread 9 -' Culture of task 2 on thread 11 is pt-BR -' Culture of task 1 on thread 10 is pt-BR -' Culture of task 3 on thread 11 is pt-BR -' Culture of task 5 on thread 11 is pt-BR -' Culture of task 6 on thread 11 is pt-BR -' Culture of task 4 on thread 10 is pt-BR -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Get1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Get1.vb deleted file mode 100644 index 6bc28fe84f897..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Get1.vb +++ /dev/null @@ -1,16 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization - -Module Example3 - Public Sub S1() - Dim culture As CultureInfo = CultureInfo.CurrentCulture - Console.WriteLine("The current culture is {0} [{1}]", - culture.NativeName, culture.Name) - End Sub -End Module -' The example displays output like the following: -' The current culture is English (United States) [en-US] -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Program.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Program.vb deleted file mode 100644 index 95f459e37e4df..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Program.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class Program - Public Shared Sub Main() - Example1.S1() - End Sub -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Project.vbproj deleted file mode 100644 index f99395b4b2b39..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/aspculture13.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/aspculture13.vb deleted file mode 100644 index 91257a0b53ff6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/aspculture13.vb +++ /dev/null @@ -1,23 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.Globalization -Imports System.Threading - -Module Example - Public Sub S1() - ' - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages(0)) - ' - End Sub -End Module - - -Public Class Request - Private Shared langs(3) As String - Public Shared ReadOnly Property UserLanguages As String() - Get - Return langs - End Get - End Property -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/changeculture11.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/changeculture11.vb deleted file mode 100644 index 59a555902417c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/changeculture11.vb +++ /dev/null @@ -1,35 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Threading - -Public Class Info : Inherits MarshalByRefObject - Public Sub ShowCurrentCulture() - Console.WriteLine("Culture of {0} in application domain {1}: {2}", - Thread.CurrentThread.Name, - AppDomain.CurrentDomain.FriendlyName, - CultureInfo.CurrentCulture.Name) - End Sub -End Class - -Module Example2 - Public Sub S1() - Dim inf As New Info() - ' Set the current culture to Dutch (Netherlands). - Thread.CurrentThread.Name = "MainThread" - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("nl-NL") - inf.ShowCurrentCulture() - - ' Create a new application domain. - Dim ad As AppDomain = AppDomain.CreateDomain("Domain2") - Dim inf2 As Info = CType(ad.CreateInstanceAndUnwrap(GetType(Info).Assembly.FullName, "Info"), - Info) - inf2.ShowCurrentCulture() - End Sub -End Module -' This example displays the following output: -' Culture of MainThread in application domain Example.exe: nl-NL -' Culture of MainThread in application domain Domain2: nl-NL -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/specific12.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/specific12.vb deleted file mode 100644 index 87380dd0c01e5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentCulture/vb/specific12.vb +++ /dev/null @@ -1,30 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Threading - -Module Example4 - Public Sub S1() - Dim value As Double = 1634.92 - CultureInfo.CurrentCulture = New CultureInfo("fr-CA") - Console.WriteLine("Current Culture: {0}", - CultureInfo.CurrentCulture.Name) - Console.WriteLine("{0:C2}", value) - Console.WriteLine() - - Thread.CurrentThread.CurrentCulture = New CultureInfo("fr") - Console.WriteLine("Current Culture: {0}", - CultureInfo.CurrentCulture.Name) - Console.WriteLine("{0:C2}", value) - End Sub -End Module -' The example displays the following output: -' Current Culture: fr-CA -' 1 634,92 $ -' -' Current Culture: fr -' 1 634,92 € -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Async1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Async1.cs deleted file mode 100644 index 37fc057397157..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Async1.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.Versioning; -using System.Threading; -using System.Threading.Tasks; - -public class Example -{ - public static async Task Main() - { - var tasks = new List(); - Console.WriteLine($"The current UI culture is {Thread.CurrentThread.CurrentUICulture.Name}"); - Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-BR"); - // Change the current UI culture to Portuguese (Brazil). - Console.WriteLine($"Current UI culture changed to {Thread.CurrentThread.CurrentUICulture.Name}"); - Console.WriteLine($"Application thread is thread {Thread.CurrentThread.ManagedThreadId}"); - // Launch six tasks and display their current culture. - for (int ctr = 0; ctr <= 5; ctr++) - tasks.Add(Task.Run(() => - { - Console.WriteLine($"UI Culture of task {Task.CurrentId} on thread {Thread.CurrentThread.ManagedThreadId} is {Thread.CurrentThread.CurrentUICulture.Name}"); - })); - - await Task.WhenAll(tasks.ToArray()); - } -} -// The example displays output like the following: -// The current UI culture is en-US -// Current UI culture changed to pt-BR -// Application thread is thread 9 -// UI Culture of task 2 on thread 11 is pt-BR -// UI Culture of task 1 on thread 10 is pt-BR -// UI Culture of task 3 on thread 11 is pt-BR -// UI Culture of task 5 on thread 11 is pt-BR -// UI Culture of task 6 on thread 11 is pt-BR -// UI Culture of task 4 on thread 10 is pt-BR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Get1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Get1.cs deleted file mode 100644 index 62eb67f1b7d56..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Get1.cs +++ /dev/null @@ -1,15 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example2 -{ - public static void Main() - { - CultureInfo culture = CultureInfo.CurrentUICulture; - Console.WriteLine($"The current UI culture is {culture.NativeName} [{culture.Name}]"); - } -} -// The example displays output like the following: -// The current UI culture is English (United States) [en-US] -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/currentuiculture1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/currentuiculture1.cs deleted file mode 100644 index 8c1432d78290c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/csharp/currentuiculture1.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example1 -{ - public static void Main() - { - Console.WriteLine($"The current UI culture: {CultureInfo.CurrentUICulture.Name}"); - - CultureInfo.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr-FR"); - Console.WriteLine($"The current UI culture: {CultureInfo.CurrentUICulture.Name}"); - } -} -// The example displays output like the following: -// The current UI culture: en-US -// The current UI culture: fr-FR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Async1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Async1.vb deleted file mode 100644 index 1b6cc161e699d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Async1.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Infer On -Option Strict On - -' -Imports System.Globalization -Imports System.Threading - -Module Example1 - Public Sub Main() - Dim tasks As New List(Of Task) - Console.WriteLine("The current UI culture is {0}", - Thread.CurrentThread.CurrentUICulture.Name) - Thread.CurrentThread.CurrentUICulture = New CultureInfo("pt-BR") - ' Change the current UI culture to Portuguese (Brazil). - Console.WriteLine("Current culture changed to {0}", - Thread.CurrentThread.CurrentUICulture.Name) - Console.WriteLine("Application thread is thread {0}", - Thread.CurrentThread.ManagedThreadId) - ' Launch six tasks and display their current culture. - For ctr As Integer = 0 To 5 - tasks.Add(Task.Run(Sub() - Console.WriteLine("Culture of task {0} on thread {1} is {2}", - Task.CurrentId, - Thread.CurrentThread.ManagedThreadId, - Thread.CurrentThread.CurrentUICulture.Name) - End Sub)) - Next - Task.WaitAll(tasks.ToArray()) - End Sub -End Module -' The example displays output like the following: -' The current culture is en-US -' Current culture changed to pt-BR -' Application thread is thread 9 -' Culture of task 2 on thread 11 is pt-BR -' Culture of task 1 on thread 10 is pt-BR -' Culture of task 3 on thread 11 is pt-BR -' Culture of task 5 on thread 11 is pt-BR -' Culture of task 6 on thread 11 is pt-BR -' Culture of task 4 on thread 10 is pt-BR -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Get1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Get1.vb deleted file mode 100644 index 96b9294dac3c1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Get1.vb +++ /dev/null @@ -1,16 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization - -Module Example3 - Public Sub Main() - Dim culture As CultureInfo = CultureInfo.CurrentCulture - Console.WriteLine("The current UI culture is {0} [{1}]", - culture.NativeName, culture.Name) - End Sub -End Module -' The example displays output like the following: -' The current UI culture is English (United States) [en-US] -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/currentuiculture1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/currentuiculture1.vb deleted file mode 100644 index 2dfafdb269224..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/CurrentUICulture/vb/currentuiculture1.vb +++ /dev/null @@ -1,20 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization - -Module Example2 - Public Sub Main() - Console.WriteLine("The current UI culture: {0}", - CultureInfo.CurrentUICulture.Name) - - CultureInfo.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr-FR") - Console.WriteLine("The current UI culture: {0}", - CultureInfo.CurrentUICulture.Name) - End Sub -End Module -' The example displays output like the following: -' The current UI culture: en-US -' The current UI culture: fr-FR -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/persist1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/persist1.cs deleted file mode 100644 index 9d21620ea6a3b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/csharp/persist1.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -using System; -using System.IO; -using System.Globalization; - -public class Example -{ - public static void Main() - { - // Persist the date and time data. - StreamWriter sw = new StreamWriter(@".\DateData.dat"); - - // Create a DateTime value. - DateTime dtIn = DateTime.Now; - // Retrieve a CultureInfo object. - CultureInfo invC = CultureInfo.InvariantCulture; - - // Convert the date to a string and write it to a file. - sw.WriteLine(dtIn.ToString("r", invC)); - sw.Close(); - - // Restore the date and time data. - StreamReader sr = new StreamReader(@".\DateData.dat"); - String input; - while ((input = sr.ReadLine()) != null) - { - Console.WriteLine($"Stored data: {input}\n"); - - // Parse the stored string. - DateTime dtOut = DateTime.Parse(input, invC, DateTimeStyles.RoundtripKind); - - // Create a French (France) CultureInfo object. - CultureInfo frFr = new CultureInfo("fr-FR"); - // Displays the date formatted for the "fr-FR" culture. - Console.WriteLine($"Date formatted for the {frFr.Name} culture: {dtOut.ToString("f", frFr)}"); - - // Creates a German (Germany) CultureInfo object. - CultureInfo deDe= new CultureInfo("de-De"); - // Displays the date formatted for the "de-DE" culture. - Console.WriteLine($"Date formatted for {deDe.Name} culture: {dtOut.ToString("f", deDe)}"); - } - sr.Close(); - } -} -// The example displays the following output: -// Stored data: Tue, 15 May 2012 16:34:16 GMT -// -// Date formatted for the fr-FR culture: mardi 15 mai 2012 16:34 -// Date formatted for de-DE culture: Dienstag, 15. Mai 2012 16:34 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/persist1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/persist1.vb deleted file mode 100644 index cb6e6ef721d52..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/InvariantCulture/vb/persist1.vb +++ /dev/null @@ -1,53 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.IO - -Module Example - Public Sub Main() - ' Persist the date and time data. - Dim sw As New StreamWriter(".\DateData.dat") - - ' Create a DateTime value. - Dim dtIn As DateTime = DateTime.Now - ' Retrieve a CultureInfo object. - Dim invC As CultureInfo = CultureInfo.InvariantCulture - - ' Convert the date to a string and write it to a file. - sw.WriteLine(dtIn.ToString("r", invC)) - sw.Close() - - ' Restore the date and time data. - Dim sr As New StreamReader(".\DateData.dat") - Dim input As String = String.Empty - Do While sr.Peek() >= 0 - input = sr.ReadLine() - Console.WriteLine("Stored data: {0}" , input) - Console.WriteLine() - - ' Parse the stored string. - Dim dtOut As DateTime = DateTime.Parse(input, invC, DateTimeStyles.RoundtripKind) - - ' Create a French (France) CultureInfo object. - Dim frFr As New CultureInfo("fr-FR") - ' Displays the date formatted for the "fr-FR" culture. - Console.WriteLine("Date formatted for the {0} culture: {1}" , - frFr.Name, dtOut.ToString("f", frFr)) - - ' Creates a German (Germany) CultureInfo object. - Dim deDe As New CultureInfo("de-De") - ' Displays the date formatted for the "de-DE" culture. - Console.WriteLine("Date formatted for {0} culture: {1}" , - deDe.Name, dtOut.ToString("f", deDe)) - Loop - sr.Close() - End Sub -End Module -' The example displays the following output: -' Stored data: Tue, 15 May 2012 16:34:16 GMT -' -' Date formatted for the fr-FR culture: mardi 15 mai 2012 16:34 -' Date formatted for de-DE culture: Dienstag, 15. Mai 2012 16:34 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/appdomainex1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/appdomainex1.cs deleted file mode 100644 index 2fac9bc192820..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/appdomainex1.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example -{ - public static void Main() - { - // Set the default culture and display the current date in the current application domain. - Info info1 = new Info(); - SetAppDomainCultures("fr-FR"); - - // Create a second application domain. - AppDomainSetup setup = new AppDomainSetup(); - setup.AppDomainInitializer = SetAppDomainCultures; - setup.AppDomainInitializerArguments = new string[] { "ru-RU" }; - AppDomain domain = AppDomain.CreateDomain("Domain2", null, setup); - // Create an Info object in the new application domain. - Info info2 = (Info)domain.CreateInstanceAndUnwrap(typeof(Example).Assembly.FullName, - "Info"); - - // Execute methods in the two application domains. - info2.DisplayDate(); - info2.DisplayCultures(); - - info1.DisplayDate(); - info1.DisplayCultures(); - } - - public static void SetAppDomainCultures(string[] names) - { - SetAppDomainCultures(names[0]); - } - - public static void SetAppDomainCultures(string name) - { - try - { - CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture(name); - CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.CreateSpecificCulture(name); - } - // If an exception occurs, we'll just fall back to the system default. - catch (CultureNotFoundException) - { - return; - } - catch (ArgumentException) - { - return; - } - } -} - -public class Info : MarshalByRefObject -{ - public void DisplayDate() - { - Console.WriteLine($"Today is {DateTime.Now:D}"); - } - - public void DisplayCultures() - { - Console.WriteLine($"Application domain is {AppDomain.CurrentDomain.Id}"); - Console.WriteLine($"Default Culture: {CultureInfo.DefaultThreadCurrentCulture}"); - Console.WriteLine($"Default UI Culture: {CultureInfo.DefaultThreadCurrentUICulture}"); - } -} -// The example displays the following output: -// Today is 14 октября 2011 г. -// Application domain is 2 -// Default Culture: ru-RU -// Default UI Culture: ru-RU -// Today is vendredi 14 octobre 2011 -// Application domain is 1 -// Default Culture: fr-FR -// Default UI Culture: fr-FR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture1.cs deleted file mode 100644 index f92562bd469ad..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture1.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; - -public class AsyncCultureEx1 -{ - public static void Main() - { - decimal[] values = { 163025412.32m, 18905365.59m }; - string formatString = "C2"; - - string FormatDelegate() - { - string output = $"Formatting using the {CultureInfo.CurrentCulture.Name} " + - $"culture on thread {Thread.CurrentThread.ManagedThreadId}.\n"; - foreach (decimal value in values) - output += $"{value.ToString(formatString)} "; - - output += Environment.NewLine; - return output; - } - - Console.WriteLine($"The example is running on thread {Thread.CurrentThread.ManagedThreadId}"); - // Make the current culture different from the system culture. - Console.WriteLine($"The current culture is {CultureInfo.CurrentCulture.Name}"); - if (CultureInfo.CurrentCulture.Name == "fr-FR") - Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); - else - Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR"); - - Console.WriteLine($"Changed the current culture to {CultureInfo.CurrentCulture.Name}.\n"); - - // Execute the delegate synchronously. - Console.WriteLine("Executing the delegate synchronously:"); - Console.WriteLine(FormatDelegate()); - - // Call an async delegate to format the values using one format string. - Console.WriteLine("Executing a task asynchronously:"); - var t1 = Task.Run(FormatDelegate); - Console.WriteLine(t1.Result); - - Console.WriteLine("Executing a task synchronously:"); - var t2 = new Task(FormatDelegate); - t2.RunSynchronously(); - Console.WriteLine(t2.Result); - } -} -// The example displays the following output: -// The example is running on thread 1 -// The current culture is en-US -// Changed the current culture to fr-FR. -// -// Executing the delegate synchronously: -// Formatting using the fr-FR culture on thread 1. -// 163 025 412,32 € 18 905 365,59 € -// -// Executing a task asynchronously: -// Formatting using the fr-FR culture on thread 3. -// 163 025 412,32 € 18 905 365,59 € -// -// Executing a task synchronously: -// Formatting using the fr-FR culture on thread 1. -// 163 025 412,32 € 18 905 365,59 € -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture3.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture3.cs deleted file mode 100644 index 2e54eb2466b0b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/asyncculture3.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; - -public class AsyncCultureEx3 -{ - public static void Main() - { - decimal[] values = { 163025412.32m, 18905365.59m }; - string formatString = "C2"; - Func formatDelegate = () => - { - string output = String.Format("Formatting using the {0} culture on thread {1}.\n", - CultureInfo.CurrentCulture.Name, - Thread.CurrentThread.ManagedThreadId); - foreach (var value in values) - output += String.Format("{0} ", value.ToString(formatString)); - - output += Environment.NewLine; - return output; - }; - - Console.WriteLine($"The example is running on thread {Thread.CurrentThread.ManagedThreadId}"); - // Make the current culture different from the system culture. - Console.WriteLine($"The current culture is {CultureInfo.CurrentCulture.Name}"); - if (CultureInfo.CurrentCulture.Name == "fr-FR") - Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); - else - Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR"); - - Console.WriteLine($"Changed the current culture to {CultureInfo.CurrentCulture.Name}.\n"); - CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CurrentCulture; - - // Execute the delegate synchronously. - Console.WriteLine("Executing the delegate synchronously:"); - Console.WriteLine(formatDelegate()); - - // Call an async delegate to format the values using one format string. - Console.WriteLine("Executing a task asynchronously:"); - var t1 = Task.Run(formatDelegate); - Console.WriteLine(t1.Result); - - Console.WriteLine("Executing a task synchronously:"); - var t2 = new Task(formatDelegate); - t2.RunSynchronously(); - Console.WriteLine(t2.Result); - } -} -// The example displays the following output: -// The example is running on thread 1 -// The current culture is en-US -// Changed the current culture to fr-FR. -// -// Executing the delegate synchronously: -// Formatting using the fr-FR culture on thread 1. -// 163 025 412,32 € 18 905 365,59 € -// -// Executing a task asynchronously: -// Formatting using the fr-FR culture on thread 3. -// 163 025 412,32 € 18 905 365,59 € -// -// Executing a task synchronously: -// Formatting using the fr-FR culture on thread 1. -// 163 025 412,32 € 18 905 365,59 € -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/change1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/change1.cs deleted file mode 100644 index b30ae399951e7..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/change1.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -using System; -using System.Globalization; - -public class ChangeEx1 -{ - public static void Main() - { - CultureInfo current = CultureInfo.CurrentCulture; - Console.WriteLine($"The current culture is {current.Name}"); - CultureInfo newCulture; - if (current.Name.Equals("fr-FR")) - newCulture = new CultureInfo("fr-LU"); - else - newCulture = new CultureInfo("fr-FR"); - - CultureInfo.CurrentCulture = newCulture; - Console.WriteLine($"The current culture is now {CultureInfo.CurrentCulture.Name}"); - } -} -// The example displays output like the following: -// The current culture is en-US -// The current culture is now fr-FR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/changeui1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/changeui1.cs deleted file mode 100644 index 6c2a2aa7c2395..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/changeui1.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -using System; -using System.Globalization; - -public class ChangeUICultureEx -{ - public static void Main() - { - CultureInfo current = CultureInfo.CurrentUICulture; - Console.WriteLine($"The current UI culture is {current.Name}"); - CultureInfo newUICulture; - if (current.Name.Equals("sl-SI")) - newUICulture = new CultureInfo("hr-HR"); - else - newUICulture = new CultureInfo("sl-SI"); - - CultureInfo.CurrentUICulture = newUICulture; - Console.WriteLine($"The current UI culture is now {CultureInfo.CurrentUICulture.Name}"); - } -} -// The example displays output like the following: -// The current UI culture is en-US -// The current UI culture is now sl-SI -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/current1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/current1.cs deleted file mode 100644 index a29a841509768..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/current1.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class CurrentCultureEx -{ - public static void Main() - { - CultureInfo culture1 = CultureInfo.CurrentCulture; - CultureInfo culture2 = Thread.CurrentThread.CurrentCulture; - Console.WriteLine($"The current culture is {culture1.Name}"); - Console.WriteLine($"The two CultureInfo objects are equal: {culture1 == culture2}"); - } -} -// The example displays output like the following: -// The current culture is en-US -// The two CultureInfo objects are equal: True -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/currentui1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/currentui1.cs deleted file mode 100644 index aabecca7d5dec..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/currentui1.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class CurrentUIEx -{ - public static void Main() - { - CultureInfo uiCulture1 = CultureInfo.CurrentUICulture; - CultureInfo uiCulture2 = Thread.CurrentThread.CurrentUICulture; - Console.WriteLine($"The current UI culture is {uiCulture1.Name}"); - Console.WriteLine($"The two CultureInfo objects are equal: {uiCulture1 == uiCulture2}"); - } -} -// The example displays output like the following: -// The current UI culture is en-US -// The two CultureInfo objects are equal: True -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/defaultthread1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/defaultthread1.cs deleted file mode 100644 index ab7f9e4ae1324..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/defaultthread1.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class DefaultThreadEx -{ - static Random rnd = new Random(); - - public static void Main() - { - if (Thread.CurrentThread.CurrentCulture.Name != "fr-FR") - { - // If current culture is not fr-FR, set culture to fr-FR. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr-FR"); - } - else - { - // Set culture to en-US. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("en-US"); - } - ThreadProc(); - - Thread worker = new Thread(ThreadProc); - worker.Name = "WorkerThread"; - worker.Start(); - } - - private static void DisplayThreadInfo() - { - Console.WriteLine($"\nCurrent Thread Name: '{Thread.CurrentThread.Name}'"); - Console.WriteLine($"Current Thread Culture/UI Culture: {Thread.CurrentThread.CurrentCulture.Name}/{Thread.CurrentThread.CurrentUICulture.Name}"); - } - - private static void DisplayValues() - { - // Create new thread and display three random numbers. - Console.WriteLine("Some currency values:"); - for (int ctr = 0; ctr <= 3; ctr++) - Console.WriteLine($" {rnd.NextDouble() * 10:C2}"); - } - - private static void ThreadProc() - { - DisplayThreadInfo(); - DisplayValues(); - } -} -// The example displays output similar to the following: -// Current Thread Name: '' -// Current Thread Culture/UI Culture: fr-FR/fr-FR -// Some currency values: -// 8,11 € -// 1,48 € -// 8,99 € -// 9,04 € -// -// Current Thread Name: 'WorkerThread' -// Current Thread Culture/UI Culture: en-US/en-US -// Some currency values: -// $6.72 -// $6.35 -// $2.90 -// $7.72 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/getcultures1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/getcultures1.cs deleted file mode 100644 index ffcdfa70ff2e5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/getcultures1.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -using System; -using System.Globalization; - -public class GetCulturesEx -{ - public static void Main() - { - // Get all custom cultures. - CultureInfo[] custom = CultureInfo.GetCultures(CultureTypes.UserCustomCulture); - if (custom.Length == 0) - { - Console.WriteLine("There are no user-defined custom cultures."); - } - else - { - Console.WriteLine("Custom cultures:"); - foreach (var culture in custom) - Console.WriteLine($" {culture.Name} -- {culture.DisplayName}"); - } - Console.WriteLine(); - - // Get all replacement cultures. - CultureInfo[] replacements = CultureInfo.GetCultures(CultureTypes.ReplacementCultures); - if (replacements.Length == 0) - { - Console.WriteLine("There are no replacement cultures."); - } - else - { - Console.WriteLine("Replacement cultures:"); - foreach (var culture in replacements) - Console.WriteLine($" {culture.Name} -- {culture.DisplayName}"); - } - Console.WriteLine(); - } -} -// The example displays output like the following: -// Custom cultures: -// x-en-US-sample -- English (United States) -// fj-FJ -- Boumaa Fijian (Viti) -// -// There are no replacement cultures. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/project.csproj deleted file mode 100644 index 2508cb7fae22e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net481 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/setthreads1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/setthreads1.cs deleted file mode 100644 index f848f7d914009..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/CultureInfo/csharp/setthreads1.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -using System; -using System.Globalization; -using System.Threading; - -public class SetThreadsEx -{ - static Random rnd = new Random(); - - public static void Main() - { - if (Thread.CurrentThread.CurrentCulture.Name != "fr-FR") - { - // If current culture is not fr-FR, set culture to fr-FR. - CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.CreateSpecificCulture("fr-FR"); - } - else - { - // Set culture to en-US. - CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.CreateSpecificCulture("en-US"); - } - ThreadProc(); - - Thread worker = new Thread(SetThreadsEx.ThreadProc); - worker.Name = "WorkerThread"; - worker.Start(); - } - - private static void DisplayThreadInfo() - { - Console.WriteLine($"\nCurrent Thread Name: '{Thread.CurrentThread.Name}'"); - Console.WriteLine($"Current Thread Culture/UI Culture: {Thread.CurrentThread.CurrentCulture.Name}/{Thread.CurrentThread.CurrentUICulture.Name}"); - } - - private static void DisplayValues() - { - // Create new thread and display three random numbers. - Console.WriteLine("Some currency values:"); - for (int ctr = 0; ctr <= 3; ctr++) - Console.WriteLine($" {rnd.NextDouble() * 10:C2}"); - } - - private static void ThreadProc() - { - DisplayThreadInfo(); - DisplayValues(); - } -} -// The example displays output similar to the following: -// Current Thread Name: '' -// Current Thread Culture/UI Culture: fr-FR/fr-FR -// Some currency values: -// 6,83 € -// 3,47 € -// 6,07 € -// 1,70 € -// -// Current Thread Name: 'WorkerThread' -// Current Thread Culture/UI Culture: fr-FR/fr-FR -// Some currency values: -// 9,54 € -// 9,50 € -// 0,58 € -// 6,91 € -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create1.cs deleted file mode 100644 index 9c54c076ec027..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create1.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; - -public class Example -{ - public static void Main() - { - CreateInvariant1(); - Console.WriteLine(); - CreateNeutral2(); - Console.WriteLine(); - CreateSpecific3(); - } - - private static void CreateInvariant1() - { - // - System.Globalization.DateTimeFormatInfo dtfi; - - dtfi = System.Globalization.DateTimeFormatInfo.InvariantInfo; - Console.WriteLine(dtfi.IsReadOnly); - - dtfi = new System.Globalization.DateTimeFormatInfo(); - Console.WriteLine(dtfi.IsReadOnly); - - dtfi = System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat; - Console.WriteLine(dtfi.IsReadOnly); - // The example displays the following output: - // True - // False - // True - // - } - - private static void CreateNeutral2() - { - // - System.Globalization.CultureInfo specific, neutral; - System.Globalization.DateTimeFormatInfo dtfi; - - // Instantiate a culture by creating a specific culture and using its Parent property. - specific = System.Globalization.CultureInfo.GetCultureInfo("fr-FR"); - neutral = specific.Parent; - dtfi = neutral.DateTimeFormat; - Console.WriteLine($"{neutral.Name} from Parent property: {dtfi.IsReadOnly}"); - - dtfi = System.Globalization.CultureInfo.GetCultureInfo("fr-FR").Parent.DateTimeFormat; - Console.WriteLine($"{neutral.Name} from Parent property: {dtfi.IsReadOnly}"); - - // Instantiate a neutral culture using the CultureInfo constructor. - neutral = new System.Globalization.CultureInfo("fr"); - dtfi = neutral.DateTimeFormat; - Console.WriteLine($"{neutral.Name} from CultureInfo constructor: {dtfi.IsReadOnly}"); - - // Instantiate a culture using CreateSpecificCulture. - neutral = System.Globalization.CultureInfo.CreateSpecificCulture("fr"); - dtfi = neutral.DateTimeFormat; - Console.WriteLine($"{neutral.Name} from CreateSpecificCulture: {dtfi.IsReadOnly}"); - - // Retrieve a culture by calling the GetCultureInfo method. - neutral = System.Globalization.CultureInfo.GetCultureInfo("fr"); - dtfi = neutral.DateTimeFormat; - Console.WriteLine($"{neutral.Name} from GetCultureInfo: {dtfi.IsReadOnly}"); - - // Instantiate a DateTimeFormatInfo object by calling GetInstance. - neutral = System.Globalization.CultureInfo.CreateSpecificCulture("fr"); - dtfi = System.Globalization.DateTimeFormatInfo.GetInstance(neutral); - Console.WriteLine($"{neutral.Name} from GetInstance: {dtfi.IsReadOnly}"); - - // The example displays the following output: - // fr from Parent property: False - // fr from Parent property: False - // fr from CultureInfo constructor: False - // fr-FR from CreateSpecificCulture: False - // fr from GetCultureInfo: True - // fr-FR from GetInstance: False - // - } - - private static void CreateSpecific3() - { - // - System.Globalization.CultureInfo ci = null; - System.Globalization.DateTimeFormatInfo dtfi = null; - - // Instantiate a culture using CreateSpecificCulture. - ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); - dtfi = ci.DateTimeFormat; - Console.WriteLine($"{ci.Name} from CreateSpecificCulture: {dtfi.IsReadOnly}"); - - // Instantiate a culture using the CultureInfo constructor. - ci = new System.Globalization.CultureInfo("en-CA"); - dtfi = ci.DateTimeFormat; - Console.WriteLine($"{ci.Name} from CultureInfo constructor: {dtfi.IsReadOnly}"); - - // Retrieve a culture by calling the GetCultureInfo method. - ci = System.Globalization.CultureInfo.GetCultureInfo("en-AU"); - dtfi = ci.DateTimeFormat; - Console.WriteLine($"{ci.Name} from GetCultureInfo: {dtfi.IsReadOnly}"); - - // Instantiate a DateTimeFormatInfo object by calling DateTimeFormatInfo.GetInstance. - ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB"); - dtfi = System.Globalization.DateTimeFormatInfo.GetInstance(ci); - Console.WriteLine($"{ci.Name} from GetInstance: {dtfi.IsReadOnly}"); - - // The example displays the following output: - // en-US from CreateSpecificCulture: False - // en-CA from CultureInfo constructor: False - // en-AU from GetCultureInfo: True - // en-GB from GetInstance: False - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create2.cs deleted file mode 100644 index 01e02d14e15c0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create2.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Globalization; - -public class Create2Ex -{ - public static void Main() - { - // - DateTimeFormatInfo dtfi; - - dtfi = DateTimeFormatInfo.CurrentInfo; - Console.WriteLine(dtfi.IsReadOnly); - - dtfi = CultureInfo.CurrentCulture.DateTimeFormat; - Console.WriteLine(dtfi.IsReadOnly); - - dtfi = DateTimeFormatInfo.GetInstance(CultureInfo.CurrentCulture); - Console.WriteLine(dtfi.IsReadOnly); - // The example displays the following output: - // True - // True - // True - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example1.cs deleted file mode 100644 index 329b9ee31e813..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example1.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example1 -{ - public static void Main() - { - DateTime dateValue = new DateTime(2013, 8, 18); - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - DateTimeFormatInfo dtfi = enUS.DateTimeFormat; - - Console.WriteLine("Before modifying DateTimeFormatInfo object: "); - Console.WriteLine($"{dtfi.ShortDatePattern}: {dateValue.ToString("d", enUS)}\n"); - - // Modify the short date pattern. - dtfi.ShortDatePattern = "yyyy-MM-dd"; - Console.WriteLine("After modifying DateTimeFormatInfo object: "); - Console.WriteLine($"{dtfi.ShortDatePattern}: {dateValue.ToString("d", enUS)}"); - } -} -// The example displays the following output: -// Before modifying DateTimeFormatInfo object: -// M/d/yyyy: 8/18/2013 -// -// After modifying DateTimeFormatInfo object: -// yyyy-MM-dd: 2013-08-18 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example2.cs deleted file mode 100644 index 3ff54e26a150e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example2.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example2 -{ - public static void Main() - { - DateTime value = new DateTime(2013, 7, 9); - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - DateTimeFormatInfo dtfi = enUS.DateTimeFormat; - String[] formats = { "D", "F", "f" }; - - // Display date before modifying properties. - foreach (var fmt in formats) - Console.WriteLine($"{fmt}: {value.ToString(fmt, dtfi)}"); - - Console.WriteLine(); - - // We don't want to change the FullDateTimePattern, so we need to save it. - String originalFullDateTimePattern = dtfi.FullDateTimePattern; - - // Modify day name abbreviations and long date pattern. - dtfi.AbbreviatedDayNames = new String[] { "Su", "M", "Tu", "W", "Th", "F", "Sa" }; - dtfi.LongDatePattern = "ddd dd-MMM-yyyy"; - dtfi.FullDateTimePattern = originalFullDateTimePattern; - foreach (var fmt in formats) - Console.WriteLine($"{fmt}: {value.ToString(fmt, dtfi)}"); - } -} -// The example displays the following output: -// D: Tuesday, July 9, 2013 -// F: Tuesday, July 9, 2013 12:00:00 AM -// f: Tuesday, July 9, 2013 12:00 AM -// -// D: Tu 09-Jul-2013 -// F: Tuesday, July 9, 2013 12:00:00 AM -// f: Tu 09-Jul-2013 12:00 AM -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example3.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example3.cs deleted file mode 100644 index 925227609f5e6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example3.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example3 -{ - public static void Main() - { - DateTime dateValue = new DateTime(2013, 08, 28); - CultureInfo frFR = CultureInfo.CreateSpecificCulture("fr-FR"); - DateTimeFormatInfo dtfi = frFR.DateTimeFormat; - - Console.WriteLine($"Before modifying DateSeparator property: {dateValue.ToString("g", frFR)}"); - - // Modify the date separator. - dtfi.DateSeparator = "-"; - Console.WriteLine($"After modifying the DateSeparator property: {dateValue.ToString("g", frFR)}"); - } -} -// The example displays the following output: -// Before modifying DateSeparator property: 28/08/2013 00:00 -// After modifying the DateSeparator property: 28-08-2013 00:00 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example4.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example4.cs deleted file mode 100644 index 14f4fc8140451..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example4.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example4 -{ - public static void Main() - { - DateTime dateValue = new DateTime(2013, 5, 18, 13, 30, 0); - String[] formats = { "D", "f", "F" }; - - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - DateTimeFormatInfo dtfi = enUS.DateTimeFormat; - String originalLongDatePattern = dtfi.LongDatePattern; - - // Display the default form of three long date formats. - foreach (var fmt in formats) - Console.WriteLine(dateValue.ToString(fmt, dtfi)); - - Console.WriteLine(); - - // Modify the long date pattern. - dtfi.LongDatePattern = originalLongDatePattern + " g"; - foreach (var fmt in formats) - Console.WriteLine(dateValue.ToString(fmt, dtfi)); - - Console.WriteLine(); - - // Change A.D. to C.E. (for Common Era) - dtfi.LongDatePattern = originalLongDatePattern + @" 'C.E.'"; - foreach (var fmt in formats) - Console.WriteLine(dateValue.ToString(fmt, dtfi)); - } -} -// The example displays the following output: -// Saturday, May 18, 2013 -// Saturday, May 18, 2013 1:30 PM -// Saturday, May 18, 2013 1:30:00 PM -// -// Saturday, May 18, 2013 A.D. -// Saturday, May 18, 2013 A.D. 1:30 PM -// Saturday, May 18, 2013 A.D. 1:30:00 PM -// -// Saturday, May 18, 2013 C.E. -// Saturday, May 18, 2013 C.E. 1:30 PM -// Saturday, May 18, 2013 C.E. 1:30:00 PM -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example5.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example5.cs deleted file mode 100644 index e23c4454dad1b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/example5.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using System; -using System.Globalization; -using System.Text.RegularExpressions; - -public class Example5 -{ - public static void Main() - { - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - DateTimeFormatInfo dtfi = enUS.DateTimeFormat; - - Console.WriteLine("Original Property Values:"); - Console.WriteLine("ShortTimePattern: " + dtfi.ShortTimePattern); - Console.WriteLine("LongTimePattern: " + dtfi.LongTimePattern); - Console.WriteLine("FullDateTimePattern: " + dtfi.FullDateTimePattern); - Console.WriteLine(); - - dtfi.LongTimePattern = ReplaceWith24HourClock(dtfi.LongTimePattern); - dtfi.ShortTimePattern = ReplaceWith24HourClock(dtfi.ShortTimePattern); - - Console.WriteLine("Modififed Property Values:"); - Console.WriteLine("ShortTimePattern: " + dtfi.ShortTimePattern); - Console.WriteLine("LongTimePattern: " + dtfi.LongTimePattern); - Console.WriteLine("FullDateTimePattern: " + dtfi.FullDateTimePattern); - } - - private static string ReplaceWith24HourClock(string fmt) - { - string pattern = @"^(?\s*t+\s*)? " + - @"(?(openAMPM) h+(?[^ht]+)$ " + - @"| \s*h+(?[^ht]+)\s*t+)"; - return Regex.Replace(fmt, pattern, "HH${nonHours}", - RegexOptions.IgnorePatternWhitespace); - } -} -// The example displays the following output: -// Original Property Values: -// ShortTimePattern: h:mm tt -// LongTimePattern: h:mm:ss tt -// FullDateTimePattern: dddd, MMMM dd, yyyy h:mm:ss tt -// -// Modififed Property Values: -// ShortTimePattern: HH:mm -// LongTimePattern: HH:mm:ss -// FullDateTimePattern: dddd, MMMM dd, yyyy HH:mm:ss -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/formatprovider1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/formatprovider1.cs deleted file mode 100644 index 1cdaa7e5fd958..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/formatprovider1.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -using System; -using System.Globalization; - -public class CurrentCultureFormatProvider : IFormatProvider -{ - public Object GetFormat(Type formatType) - { - Console.WriteLine($"Requesting an object of type {formatType.Name}"); - if (formatType == typeof(NumberFormatInfo)) - return NumberFormatInfo.CurrentInfo; - else if (formatType == typeof(DateTimeFormatInfo)) - return DateTimeFormatInfo.CurrentInfo; - else - return null; - } -} - -public class FormatProviderEx1 -{ - public static void Main() - { - DateTime dateValue = new DateTime(2013, 5, 28, 13, 30, 0); - string value = dateValue.ToString("F", new CurrentCultureFormatProvider()); - Console.WriteLine(value); - Console.WriteLine(); - string composite = String.Format(new CurrentCultureFormatProvider(), - "Date: {0:d} Amount: {1:C} Description: {2}", - dateValue, 1264.03m, "Service Charge"); - Console.WriteLine(composite); - Console.WriteLine(); - } -} -// The example displays output like the following: -// Requesting an object of type DateTimeFormatInfo -// Tuesday, May 28, 2013 1:30:00 PM -// -// Requesting an object of type ICustomFormatter -// Requesting an object of type DateTimeFormatInfo -// Requesting an object of type NumberFormatInfo -// Date: 5/28/2013 Amount: $1,264.03 Description: Service Charge -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate2.cs deleted file mode 100644 index fde2e0a0c06aa..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate2.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx1 -{ - public static void Main() - { - DateTimeFormatInfo current1 = DateTimeFormatInfo.CurrentInfo; - current1 = (DateTimeFormatInfo)current1.Clone(); - Console.WriteLine(current1.IsReadOnly); - - CultureInfo culture2 = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); - DateTimeFormatInfo current2 = culture2.DateTimeFormat; - Console.WriteLine(current2.IsReadOnly); - } -} -// The example displays the following output: -// False -// False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate3.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate3.cs deleted file mode 100644 index 5eb266248b6d5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate3.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx3 -{ - public static void Main() - { - CultureInfo culture; - DateTimeFormatInfo dtfi; - - culture = CultureInfo.CurrentCulture; - dtfi = culture.DateTimeFormat; - Console.WriteLine($"Culture Name: {culture.Name}"); - Console.WriteLine($"User Overrides: {culture.UseUserOverride}"); - Console.WriteLine($"Long Time Pattern: {culture.DateTimeFormat.LongTimePattern}\n"); - - culture = new CultureInfo(CultureInfo.CurrentCulture.Name, false); - Console.WriteLine($"Culture Name: {culture.Name}"); - Console.WriteLine($"User Overrides: {culture.UseUserOverride}"); - Console.WriteLine($"Long Time Pattern: {culture.DateTimeFormat.LongTimePattern}\n"); - } -} -// The example displays the following output: -// Culture Name: en-US -// User Overrides: True -// Long Time Pattern: HH:mm:ss -// -// Culture Name: en-US -// User Overrides: False -// Long Time Pattern: h:mm:ss tt -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate6.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate6.cs deleted file mode 100644 index 2a1235fde3522..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/instantiate6.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Reflection; - -public class InstantiateEx6 -{ - public static void Main() - { - // Get all the neutral cultures - List names = new List(); - Array.ForEach(CultureInfo.GetCultures(CultureTypes.NeutralCultures), - culture => names.Add(culture.Name)); - names.Sort(); - foreach (var name in names) - { - // Ignore the invariant culture. - if (name == "") continue; - - ListSimilarChildCultures(name); - } - } - - private static void ListSimilarChildCultures(String name) - { - // Create the neutral DateTimeFormatInfo object. - DateTimeFormatInfo dtfi = CultureInfo.GetCultureInfo(name).DateTimeFormat; - // Retrieve all specific cultures of the neutral culture. - CultureInfo[] cultures = Array.FindAll(CultureInfo.GetCultures(CultureTypes.SpecificCultures), - culture => culture.Name.StartsWith(name + "-", StringComparison.OrdinalIgnoreCase)); - // Create an array of DateTimeFormatInfo properties - PropertyInfo[] properties = typeof(DateTimeFormatInfo).GetProperties(BindingFlags.Instance | BindingFlags.Public); - bool hasOneMatch = false; - - foreach (var ci in cultures) - { - bool match = true; - // Get the DateTimeFormatInfo for a specific culture. - DateTimeFormatInfo specificDtfi = ci.DateTimeFormat; - // Compare the property values of the two. - foreach (var prop in properties) - { - // We're not interested in the value of IsReadOnly. - if (prop.Name == "IsReadOnly") continue; - - // For arrays, iterate the individual elements to see if they are the same. - if (prop.PropertyType.IsArray) - { - IList nList = (IList)prop.GetValue(dtfi, null); - IList sList = (IList)prop.GetValue(specificDtfi, null); - if (nList.Count != sList.Count) - { - match = false; - Console.WriteLine($" Different n in {prop.Name} array for {name} and {ci.Name}"); - break; - } - - for (int ctr = 0; ctr < nList.Count; ctr++) - { - if (!nList[ctr].Equals(sList[ctr])) - { - match = false; - Console.WriteLine($" {prop.Name} value different for {name} and {ci.Name}"); - break; - } - } - - if (!match) break; - } - // Get non-array values. - else - { - Object specificValue = prop.GetValue(specificDtfi); - Object neutralValue = prop.GetValue(dtfi); - - // Handle comparison of Calendar objects. - if (prop.Name == "Calendar") - { - // The cultures have a different calendar type. - if (specificValue.ToString() != neutralValue.ToString()) - { - Console.WriteLine($" Different calendar types for {name} and {ci.Name}"); - match = false; - break; - } - - if (specificValue is GregorianCalendar) - { - if (((GregorianCalendar)specificValue).CalendarType != ((GregorianCalendar)neutralValue).CalendarType) - { - Console.WriteLine($" Different Gregorian calendar types for {name} and {ci.Name}"); - match = false; - break; - } - } - } - else if (!specificValue.Equals(neutralValue)) - { - match = false; - Console.WriteLine($" Different {prop.Name} values for {name} and {ci.Name}"); - break; - } - } - } - if (match) - { - Console.WriteLine($"DateTimeFormatInfo object for '{name}' matches '{ci.Name}'"); - hasOneMatch = true; - } - } - if (!hasOneMatch) - Console.WriteLine($"DateTimeFormatInfo object for '{name}' --> No Match"); - - Console.WriteLine(); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse1.cs deleted file mode 100644 index d1a51b3cf63ef..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse1.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -using System; -using System.Globalization; - -public class ParseEx1 -{ - public static void Main() - { - string[] dateStrings = { "08/18/2014", "01/02/2015" }; - string[] cultureNames = { "en-US", "en-GB", "fr-FR", "fi-FI" }; - - foreach (var cultureName in cultureNames) - { - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - Console.WriteLine($"Parsing strings using the {culture.Name} culture."); - foreach (var dateStr in dateStrings) - { - try - { - Console.WriteLine(String.Format(culture, - " '{0}' --> {1:D}", dateStr, - DateTime.Parse(dateStr, culture))); - } - catch (FormatException) - { - Console.WriteLine($" Unable to parse '{dateStr}'"); - } - } - } - } -} -// The example displays the following output: -// Parsing strings using the en-US culture. -// '08/18/2014' --> Monday, August 18, 2014 -// '01/02/2015' --> Friday, January 02, 2015 -// Parsing strings using the en-GB culture. -// Unable to parse '08/18/2014' -// '01/02/2015' --> 01 February 2015 -// Parsing strings using the fr-FR culture. -// Unable to parse '08/18/2014' -// '01/02/2015' --> dimanche 1 février 2015 -// Parsing strings using the fi-FI culture. -// Unable to parse '08/18/2014' -// '01/02/2015' --> 1. helmikuuta 2015 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse2.cs deleted file mode 100644 index 3888b6215d933..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/parse2.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -using System; -using System.Globalization; - -public class ParseEx2 -{ - public static void Main() - { - string inputDate = "14/05/10"; - - CultureInfo[] cultures = { CultureInfo.GetCultureInfo("en-US"), - CultureInfo.CreateSpecificCulture("en-US") }; - - foreach (var culture in cultures) - { - try - { - Console.WriteLine($"{culture.Name} culture reflects user overrides: {culture.UseUserOverride}"); - DateTime occasion = DateTime.Parse(inputDate, culture); - Console.WriteLine($"'{inputDate}' --> {occasion.ToString("D", CultureInfo.InvariantCulture)}"); - } - catch (FormatException) - { - Console.WriteLine($"Unable to parse '{inputDate}'"); - } - Console.WriteLine(); - } - } -} -// The example displays the following output: -// en-US culture reflects user overrides: False -// Unable to parse '14/05/10' -// -// en-US culture reflects user overrides: True -// '14/05/10' --> Saturday, 10 May 2014 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/project.csproj deleted file mode 100644 index cb4ea68ebe389..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Library - net10.0 - enable - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize1.cs deleted file mode 100644 index c7b73185d3fe5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize1.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -using System; -using System.Globalization; -using System.IO; - -public class SerializeEx1 -{ - public static void Main() - { - StreamWriter sw = new StreamWriter(@".\DateData.dat"); - // Define a date and time to serialize. - DateTime originalDate = new DateTime(2014, 08, 18, 08, 16, 35); - // Display information on the date and time. - Console.WriteLine($"Date to serialize: {originalDate:F}"); - Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.Name}"); - Console.WriteLine($"Time Zone: {TimeZoneInfo.Local.DisplayName}"); - // Convert the date value to UTC. - DateTime utcDate = originalDate.ToUniversalTime(); - // Serialize the UTC value. - sw.Write(utcDate.ToString("o", DateTimeFormatInfo.InvariantInfo)); - sw.Close(); - } -} -// The example displays the following output: -// Date to serialize: Monday, August 18, 2014 8:16:35 AM -// Current Culture: en-US -// Time Zone: (UTC-08:00) Pacific Time (US & Canada) -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize2.cs deleted file mode 100644 index 42e02b9c5924d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/serialize2.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -using System; -using System.Globalization; -using System.IO; - -public class SerializeEx2 -{ - public static void Main() - { - // Open the file and retrieve the date string. - StreamReader sr = new StreamReader(@".\DateData.dat"); - String dateValue = sr.ReadToEnd(); - - // Parse the date. - DateTime parsedDate = DateTime.ParseExact(dateValue, "o", - DateTimeFormatInfo.InvariantInfo); - // Convert it to local time. - DateTime restoredDate = parsedDate.ToLocalTime(); - // Display information on the date and time. - Console.WriteLine($"Deserialized date: {restoredDate:F}"); - Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.Name}"); - Console.WriteLine($"Time Zone: {TimeZoneInfo.Local.DisplayName}"); - } -} -// The example displays the following output: -// Deserialized date: lundi 18 août 2014 17:16:35 -// Current Culture: fr-FR -// Time Zone: (UTC+01:00) Brussels, Copenhagen, Madrid, Paris -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_currency1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_currency1.cs deleted file mode 100644 index 1e5cb5579d2fc..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_currency1.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -using System; -using System.Globalization; - -public class Example -{ - public static void Main() - { - // Retrieve a writable NumberFormatInfo object. - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - NumberFormatInfo nfi = enUS.NumberFormat; - - // Use the ISO currency symbol instead of the native currency symbol. - nfi.CurrencySymbol = (new RegionInfo(enUS.Name)).ISOCurrencySymbol; - // Change the positive currency pattern to . - nfi.CurrencyPositivePattern = 2; - // Change the negative currency pattern to . - nfi.CurrencyNegativePattern = 12; - - // Produce the result strings by calling ToString. - Decimal[] values = { 1065.23m, 19.89m, -.03m, -175902.32m }; - foreach (var value in values) - Console.WriteLine(value.ToString("C", enUS)); - - Console.WriteLine(); - - // Produce the result strings by calling a composite formatting method. - foreach (var value in values) - Console.WriteLine(String.Format(enUS, "{0:C}", value)); - } -} -// The example displays the following output: -// USD 1,065.23 -// USD 19.89 -// USD -0.03 -// USD -175,902.32 -// -// USD 1,065.23 -// USD 19.89 -// USD -0.03 -// USD -175,902.32 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_ssn1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_ssn1.cs deleted file mode 100644 index 1e91cac484a24..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/customize_ssn1.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -using System; -using System.Globalization; - -public class CustomizeSSNEx -{ - public static void Main() - { - // Instantiate a read-only NumberFormatInfo object. - CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US"); - NumberFormatInfo nfi = enUS.NumberFormat; - - // Modify the relevant properties. - nfi.NumberGroupSeparator = "-"; - nfi.NumberGroupSizes = new int[] { 3, 2, 4 }; - nfi.NumberDecimalDigits = 0; - - int[] ids = { 111223333, 999776666 }; - - // Produce the result string by calling ToString. - foreach (var id in ids) - Console.WriteLine(id.ToString("N", enUS)); - - Console.WriteLine(); - - // Produce the result string using composite formatting. - foreach (var id in ids) - Console.WriteLine(String.Format(enUS, "{0:N}", id)); - } -} -// The example displays the following output: -// 1112-23-333 -// 9997-76-666 -// -// 1112-23-333 -// 9997-76-666 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/formatprovider1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/formatprovider1.cs deleted file mode 100644 index de769d0f2cb43..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/formatprovider1.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -using System; -using System.Globalization; - -public class CurrentCultureFormatProvider : IFormatProvider -{ - public Object GetFormat(Type formatType) - { - Console.WriteLine($"Requesting an object of type {formatType.Name}"); - if (formatType == typeof(NumberFormatInfo)) - return NumberFormatInfo.CurrentInfo; - else if (formatType == typeof(DateTimeFormatInfo)) - return DateTimeFormatInfo.CurrentInfo; - else - return null; - } -} - -public class FormatProviderEx -{ - public static void Main() - { - Decimal amount = 1203.541m; - string value = amount.ToString("C2", new CurrentCultureFormatProvider()); - Console.WriteLine(value); - Console.WriteLine(); - string composite = String.Format(new CurrentCultureFormatProvider(), - "Date: {0} Amount: {1} Description: {2}", - DateTime.Now, 1264.03m, "Service Charge"); - Console.WriteLine(composite); - Console.WriteLine(); - } -} -// The example displays output like the following: -// Requesting an object of type NumberFormatInfo -// $1,203.54 -// -// Requesting an object of type ICustomFormatter -// Requesting an object of type DateTimeFormatInfo -// Requesting an object of type NumberFormatInfo -// Date: 11/15/2012 2:00:01 PM Amount: 1264.03 Description: Service Charge -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate1.cs deleted file mode 100644 index 9f1517d5dadcd..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate1.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx1 -{ - public static void Main() - { - NumberFormatInfo current1 = CultureInfo.CurrentCulture.NumberFormat; - Console.WriteLine(current1.IsReadOnly); - - NumberFormatInfo current2 = NumberFormatInfo.CurrentInfo; - Console.WriteLine(current2.IsReadOnly); - - NumberFormatInfo current3 = NumberFormatInfo.GetInstance(CultureInfo.CurrentCulture); - Console.WriteLine(current3.IsReadOnly); - } -} -// The example displays the following output: -// True -// True -// True -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate2.cs deleted file mode 100644 index 940e39567844f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate2.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx2 -{ - public static void Main() - { - NumberFormatInfo current1 = NumberFormatInfo.CurrentInfo; - current1 = (NumberFormatInfo)current1.Clone(); - Console.WriteLine(current1.IsReadOnly); - - CultureInfo culture2 = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); - NumberFormatInfo current2 = culture2.NumberFormat; - Console.WriteLine(current2.IsReadOnly); - } -} -// The example displays the following output: -// False -// False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate3.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate3.cs deleted file mode 100644 index 82e9576ce113a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate3.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx3 -{ - public static void Main() - { - CultureInfo culture; - NumberFormatInfo nfi; - - culture = CultureInfo.CurrentCulture; - nfi = culture.NumberFormat; - Console.WriteLine($"Culture Name: {culture.Name}"); - Console.WriteLine($"User Overrides: {culture.UseUserOverride}"); - Console.WriteLine($"Currency Symbol: {culture.NumberFormat.CurrencySymbol}\n"); - - culture = new CultureInfo(CultureInfo.CurrentCulture.Name, false); - Console.WriteLine($"Culture Name: {culture.Name}"); - Console.WriteLine($"User Overrides: {culture.UseUserOverride}"); - Console.WriteLine($"Currency Symbol: {culture.NumberFormat.CurrencySymbol}"); - } -} -// The example displays the following output: -// Culture Name: en-US -// User Overrides: True -// Currency Symbol: USD -// -// Culture Name: en-US -// User Overrides: False -// Currency Symbol: $ -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate4.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate4.cs deleted file mode 100644 index 6156482cc1f39..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate4.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx4 -{ - public static void Main() - { - NumberFormatInfo nfi; - - nfi = System.Globalization.NumberFormatInfo.InvariantInfo; - Console.WriteLine(nfi.IsReadOnly); - - nfi = CultureInfo.InvariantCulture.NumberFormat; - Console.WriteLine(nfi.IsReadOnly); - - nfi = new NumberFormatInfo(); - Console.WriteLine(nfi.IsReadOnly); - } -} -// The example displays the following output: -// True -// True -// False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate5.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate5.cs deleted file mode 100644 index c43d50b1c1bcb..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate5.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -using System; -using System.Globalization; - -public class InstantiateEx5 -{ - public static void Main() - { - CultureInfo culture; - NumberFormatInfo nfi; - - nfi = CultureInfo.GetCultureInfo("id-ID").NumberFormat; - Console.WriteLine($"Read-only: {nfi.IsReadOnly}"); - - culture = new CultureInfo("id-ID"); - nfi = NumberFormatInfo.GetInstance(culture); - Console.WriteLine($"Read-only: {nfi.IsReadOnly}"); - - culture = CultureInfo.CreateSpecificCulture("id-ID"); - nfi = culture.NumberFormat; - Console.WriteLine($"Read-only: {nfi.IsReadOnly}"); - - culture = new CultureInfo("id-ID"); - nfi = culture.NumberFormat; - Console.WriteLine($"Read-only: {nfi.IsReadOnly}"); - } -} -// The example displays the following output: -// Read-only: True -// Read-only: False -// Read-only: False -// Read-only: False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate6.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate6.cs deleted file mode 100644 index a115ceb3a7338..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/instantiate6.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Reflection; - -public class InstantiateEx6 -{ - public static void Main() - { - // Get all the neutral cultures - List names = new List(); - Array.ForEach(CultureInfo.GetCultures(CultureTypes.NeutralCultures), - culture => names.Add(culture.Name)); - names.Sort(); - foreach (var name in names) - { - // Ignore the invariant culture. - if (name == "") continue; - - ListSimilarChildCultures(name); - } - } - - private static void ListSimilarChildCultures(string name) - { - // Create the neutral NumberFormatInfo object. - NumberFormatInfo nfi = CultureInfo.GetCultureInfo(name).NumberFormat; - // Retrieve all specific cultures of the neutral culture. - CultureInfo[] cultures = Array.FindAll(CultureInfo.GetCultures(CultureTypes.SpecificCultures), - culture => culture.Name.StartsWith(name + "-", StringComparison.OrdinalIgnoreCase)); - // Create an array of NumberFormatInfo properties - PropertyInfo[] properties = typeof(NumberFormatInfo).GetProperties(BindingFlags.Instance | BindingFlags.Public); - bool hasOneMatch = false; - - foreach (var ci in cultures) - { - bool match = true; - // Get the NumberFormatInfo for a specific culture. - NumberFormatInfo specificNfi = ci.NumberFormat; - // Compare the property values of the two. - foreach (var prop in properties) - { - // We're not interested in the value of IsReadOnly. - if (prop.Name == "IsReadOnly") continue; - - // For arrays, iterate the individual elements to see if they are the same. - if (prop.PropertyType.IsArray) - { - IList nList = (IList)prop.GetValue(nfi, null); - IList sList = (IList)prop.GetValue(specificNfi, null); - if (nList.Count != sList.Count) - { - match = false; - break; - } - - for (int ctr = 0; ctr < nList.Count; ctr++) - { - if (!nList[ctr].Equals(sList[ctr])) - { - match = false; - break; - } - } - } - else if (!prop.GetValue(specificNfi).Equals(prop.GetValue(nfi))) - { - match = false; - break; - } - } - if (match) - { - Console.WriteLine($"NumberFormatInfo object for '{name}' matches '{ci.Name}'"); - hasOneMatch = true; - } - } - if (!hasOneMatch) - Console.WriteLine($"NumberFormatInfo object for '{name}' --> No Match"); - - Console.WriteLine(); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parse1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parse1.cs deleted file mode 100644 index 1ccddbbfa6185..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parse1.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -using System; -using System.Globalization; - -public class ParseEx1 -{ - public static void Main() - { - String[] values = { "1,034,562.91", "9 532 978,07" }; - String[] cultureNames = { "en-US", "fr-FR", "" }; - - foreach (var value in values) - { - foreach (var cultureName in cultureNames) - { - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - String name = culture.Name == "" ? "Invariant" : culture.Name; - try - { - Decimal amount = Decimal.Parse(value, culture); - Console.WriteLine($"'{value}' --> {amount} ({name})"); - } - catch (FormatException) - { - Console.WriteLine($"'{value}': FormatException ({name})"); - } - } - Console.WriteLine(); - } - } -} -// The example displays the following output: -// '1,034,562.91' --> 1034562.91 (en-US) -// '1,034,562.91': FormatException (fr-FR) -// '1,034,562.91' --> 1034562.91 (Invariant) -// -// '9 532 978,07': FormatException (en-US) -// '9 532 978,07' --> 9532978.07 (fr-FR) -// '9 532 978,07': FormatException (Invariant) -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parsepersisted.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parsepersisted.cs deleted file mode 100644 index 23e05bd954e21..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parsepersisted.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Threading; - -public class ParsePersistedEx -{ - public static void Main() - { - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - PersistData(); - - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("pt-BR"); - RestoreData(); - } - - private static void PersistData() - { - // Define an array of floating-point values. - Double[] values = { 160325.972, 8631.16, 1.304e5, 98017554.385, - 8.5938287084321676e94 }; - Console.WriteLine("Original values: "); - foreach (var value in values) - Console.WriteLine(value.ToString("R", CultureInfo.InvariantCulture)); - - // Serialize an array of doubles to a file - StreamWriter sw = new StreamWriter(@".\NumericData.bin"); - for (int ctr = 0; ctr < values.Length; ctr++) - { - sw.Write(values[ctr].ToString("R")); - if (ctr < values.Length - 1) sw.Write("|"); - } - sw.Close(); - Console.WriteLine(); - } - - private static void RestoreData() - { - // Deserialize the data - StreamReader sr = new StreamReader(@".\NumericData.bin"); - String data = sr.ReadToEnd(); - sr.Close(); - - String[] stringValues = data.Split('|'); - List newValueList = new List(); - - foreach (var stringValue in stringValues) - { - try - { - newValueList.Add(Double.Parse(stringValue)); - } - catch (FormatException) - { - newValueList.Add(Double.NaN); - } - } - - Console.WriteLine("Restored values:"); - foreach (var newValue in newValueList) - Console.WriteLine(newValue.ToString("R", NumberFormatInfo.InvariantInfo)); - } -} -// The example displays the following output: -// Original values: -// 160325.972 -// 8631.16 -// 130400 -// 98017554.385 -// 8.5938287084321671E+94 -// -// Restored values: -// 160325972 -// 863116 -// 130400 -// 98017554385 -// 8.5938287084321666E+110 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parseuser1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parseuser1.cs deleted file mode 100644 index 662c8e55016ef..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/parseuser1.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -using System; -using System.Globalization; - -public class ParseUserEx -{ - public static void Main() - { - CultureInfo stdCulture = CultureInfo.GetCultureInfo("en-US"); - CultureInfo custCulture = CultureInfo.CreateSpecificCulture("en-US"); - - String value = "310,16"; - try - { - Console.WriteLine($"{stdCulture.Name} culture reflects user overrides: {stdCulture.UseUserOverride}"); - Decimal amount = Decimal.Parse(value, stdCulture); - Console.WriteLine($"'{value}' --> {amount.ToString(CultureInfo.InvariantCulture)}"); - } - catch (FormatException) - { - Console.WriteLine($"Unable to parse '{value}'"); - } - Console.WriteLine(); - - try - { - Console.WriteLine($"{custCulture.Name} culture reflects user overrides: {custCulture.UseUserOverride}"); - Decimal amount = Decimal.Parse(value, custCulture); - Console.WriteLine($"'{value}' --> {amount.ToString(CultureInfo.InvariantCulture)}"); - } - catch (FormatException) - { - Console.WriteLine($"Unable to parse '{value}'"); - } - } -} -// The example displays the following output: -// en-US culture reflects user overrides: False -// '310,16' --> 31016 -// -// en-US culture reflects user overrides: True -// '310,16' --> 310.16 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/project.csproj deleted file mode 100644 index cb4ea68ebe389..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Library - net10.0 - enable - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties1.cs deleted file mode 100644 index 3be5c7e9cb886..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties1.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Globalization; - -public class PropertiesEx1 -{ - public static void Main() - { - string[] formatStrings = { "C2", "E1", "F", "G3", "N", - "#,##0.000", "0,000,000,000.0##" }; - CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US"); - Decimal[] values = { 1345.6538m, 1921651.16m }; - - foreach (var value in values) - { - foreach (var formatString in formatStrings) - { - string resultString = value.ToString(formatString, culture); - Console.WriteLine("{0,-18} --> {1}", formatString, resultString); - } - Console.WriteLine(); - } - } -} -// The example displays the following output: -// C2 --> $1,345.65 -// E1 --> 1.3E+003 -// F --> 1345.65 -// G3 --> 1.35E+03 -// N --> 1,345.65 -// #,##0.000 --> 1,345.654 -// 0,000,000,000.0## --> 0,000,001,345.654 -// -// C2 --> $1,921,651.16 -// E1 --> 1.9E+006 -// F --> 1921651.16 -// G3 --> 1.92E+06 -// N --> 1,921,651.16 -// #,##0.000 --> 1,921,651.160 -// 0,000,000,000.0## --> 0,001,921,651.16 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties2.cs deleted file mode 100644 index dee3c390c4ad0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/NumberFormatInfo/csharp/properties2.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -using System; - -public class PropertiesEx2 -{ - public static void Main() - { - Decimal[] values = { 1345.6538m, 1921651.16m }; - - foreach (var value in values) - { - string resultString = value.ToString(); - Console.WriteLine(resultString); - Console.WriteLine(); - } - } -} -// The example displays the following output: -// 1345.6538 -// -// 1921651.16 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/Project.csproj deleted file mode 100644 index a369cfa8a8090..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/propertyvalues1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/propertyvalues1.cs deleted file mode 100644 index 18ebcf53bbdae..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Globalization/RegionInfo/csharp/propertyvalues1.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -using System; -using System.Globalization; -using System.Reflection; - -public class Example -{ - public static void Main() - { - // Instantiate three Belgian RegionInfo objects. - RegionInfo BE = new RegionInfo("BE"); - RegionInfo frBE = new RegionInfo("fr-BE"); - RegionInfo nlBE = new RegionInfo("nl-BE"); - - RegionInfo[] regions = { BE, frBE, nlBE }; - PropertyInfo[] props = typeof(RegionInfo).GetProperties(BindingFlags.Instance | BindingFlags.Public); - - Console.WriteLine("{0,-30}{1,18}{2,18}{3,18}\n", - "RegionInfo Property", "BE", "fr-BE", "nl-BE"); - foreach (var prop in props) - { - Console.Write("{0,-30}", prop.Name); - foreach (var region in regions) - Console.Write("{0,18}", prop.GetValue(region, null)); - - Console.WriteLine(); - } - } -} -// The example displays the following output: -// RegionInfo Property BE fr-BE nl-BE -// -// Name BE fr-BE nl-BE -// EnglishName Belgium Belgium Belgium -// DisplayName Belgium Belgium Belgium -// NativeName België Belgique België -// TwoLetterISORegionName BE BE BE -// ThreeLetterISORegionName BEL BEL BEL -// ThreeLetterWindowsRegionName BEL BEL BEL -// IsMetric True True True -// GeoId 21 21 21 -// CurrencyEnglishName Euro Euro Euro -// CurrencyNativeName euro euro euro -// CurrencySymbol € € € -// ISOCurrencySymbol EUR EUR EUR -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/BigInteger_Examples.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/BigInteger_Examples.cs deleted file mode 100644 index 57efe9e4e1721..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/BigInteger_Examples.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Numerics; - -public class Example -{ - public static void Main() - { - // - BigInteger bigIntFromDouble = new BigInteger(179032.6541); - Console.WriteLine(bigIntFromDouble); - BigInteger bigIntFromInt64 = new BigInteger(934157136952); - Console.WriteLine(bigIntFromInt64); - // The example displays the following output: - // 179032 - // 934157136952 - // - - Console.WriteLine(); - - // - long longValue = 6315489358112; - BigInteger assignedFromLong = longValue; - Console.WriteLine(assignedFromLong); - // The example displays the following output: - // 6315489358112 - // - - Console.WriteLine(); - Console.WriteLine("Casting:"); - // - BigInteger assignedFromDouble = (BigInteger) 179032.6541; - Console.WriteLine(assignedFromDouble); - BigInteger assignedFromDecimal = (BigInteger) 64312.65m; - Console.WriteLine(assignedFromDecimal); - // The example displays the following output: - // 179032 - // 64312 - // - - Console.WriteLine(); - - // - byte[] byteArray = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; - BigInteger newBigInt = new BigInteger(byteArray); - Console.WriteLine($"The value of newBigInt is {newBigInt} (or 0x{newBigInt:x})."); - // The example displays the following output: - // The value of newBigInt is 4759477275222530853130 (or 0x102030405060708090a). - // - - Console.WriteLine(); - - // - string positiveString = "91389681247993671255432112000000"; - string negativeString = "-90315837410896312071002088037140000"; - BigInteger posBigInt = 0; - BigInteger negBigInt = 0; - - try { - posBigInt = BigInteger.Parse(positiveString); - Console.WriteLine(posBigInt); - } - catch (FormatException) - { - Console.WriteLine($"Unable to convert the string '{positiveString}' to a BigInteger value."); - } - - if (BigInteger.TryParse(negativeString, out negBigInt)) - Console.WriteLine(negBigInt); - else - Console.WriteLine($"Unable to convert the string '{negativeString}' to a BigInteger value."); - - // The example displays the following output: - // 9.1389681247993671255432112E+31 - // -9.0315837410896312071002088037E+34 - // - - Console.WriteLine(); - - // - BigInteger number = BigInteger.Pow(UInt64.MaxValue, 3); - Console.WriteLine(number); - // The example displays the following output: - // 6277101735386680762814942322444851025767571854389858533375 - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples.cs deleted file mode 100644 index 8d4dd1b6bda05..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.Globalization; -using System.Numerics; - -public class ByteHexExample -{ - public static void Main() - { - RoundtripBigInteger(); - Console.WriteLine(); - RoundtripInt16(); - Console.WriteLine(); - HandleSignsInByteArray(); - Console.WriteLine(); - RoundtripAmbiguous(); - Console.WriteLine(); - RoundtripWithHex(); - } - - private static void RoundtripBigInteger() - { - Console.WriteLine("Round-trip bytes"); - - // - BigInteger number = BigInteger.Pow(Int64.MaxValue, 2); - Console.WriteLine(number); - - // Write the BigInteger value to a byte array. - byte[] bytes = number.ToByteArray(); - - // Display the byte array. - foreach (byte byteValue in bytes) - Console.Write("0x{0:X2} ", byteValue); - Console.WriteLine(); - - // Restore the BigInteger value from a Byte array. - BigInteger newNumber = new BigInteger(bytes); - Console.WriteLine(newNumber); - // The example displays the following output: - // 8.5070591730234615847396907784E+37 - // 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x3F - // - // 8.5070591730234615847396907784E+37 - // - } - - private static void RoundtripInt16() - { - Console.WriteLine(); - Console.WriteLine("Round-trip an Int16 value:"); - // - short originalValue = 30000; - Console.WriteLine(originalValue); - - // Convert the Int16 value to a byte array. - byte[] bytes = BitConverter.GetBytes(originalValue); - - // Display the byte array. - foreach (byte byteValue in bytes) - Console.Write("0x{0} ", byteValue.ToString("X2")); - Console.WriteLine(); - - // Pass byte array to the BigInteger constructor. - BigInteger number = new BigInteger(bytes); - Console.WriteLine(number); - // The example displays the following output: - // 30000 - // 0x30 0x75 - // 30000 - // - } - - private static void HandleSignsInByteArray() - { - // - int negativeNumber = -1000000; - uint positiveNumber = 4293967296; - - byte[] negativeBytes = BitConverter.GetBytes(negativeNumber); - BigInteger negativeBigInt = new BigInteger(negativeBytes); - Console.WriteLine(negativeBigInt.ToString("N0")); - - byte[] tempPosBytes = BitConverter.GetBytes(positiveNumber); - byte[] positiveBytes = new byte[tempPosBytes.Length + 1]; - Array.Copy(tempPosBytes, positiveBytes, tempPosBytes.Length); - BigInteger positiveBigInt = new BigInteger(positiveBytes); - Console.WriteLine(positiveBigInt.ToString("N0")); - // The example displays the following output: - // -1,000,000 - // 4,293,967,296 - // - } - - private static void RoundtripAmbiguous() - { - Console.WriteLine("Round-trip an Ambiguous Value:"); - // - BigInteger positiveValue = 15777216; - BigInteger negativeValue = -1000000; - - Console.WriteLine("Positive value: " + positiveValue.ToString("N0")); - byte[] bytes = positiveValue.ToByteArray(); - - foreach (byte byteValue in bytes) - Console.Write("{0:X2} ", byteValue); - Console.WriteLine(); - positiveValue = new BigInteger(bytes); - Console.WriteLine("Restored positive value: " + positiveValue.ToString("N0")); - - Console.WriteLine(); - - Console.WriteLine("Negative value: " + negativeValue.ToString("N0")); - bytes = negativeValue.ToByteArray(); - foreach (byte byteValue in bytes) - Console.Write("{0:X2} ", byteValue); - Console.WriteLine(); - negativeValue = new BigInteger(bytes); - Console.WriteLine("Restored negative value: " + negativeValue.ToString("N0")); - // The example displays the following output: - // Positive value: 15,777,216 - // C0 BD F0 00 - // Restored positive value: 15,777,216 - // - // Negative value: -1,000,000 - // C0 BD F0 - // Restored negative value: -1,000,000 - // - } - - private static void RoundtripWithHex() - { - // - BigInteger negativeNumber = -1000000; - BigInteger positiveNumber = 15777216; - - string negativeHex = negativeNumber.ToString("X"); - string positiveHex = positiveNumber.ToString("X"); - - BigInteger negativeNumber2, positiveNumber2; - negativeNumber2 = BigInteger.Parse(negativeHex, - NumberStyles.HexNumber); - positiveNumber2 = BigInteger.Parse(positiveHex, - NumberStyles.HexNumber); - - Console.WriteLine($"Converted {negativeNumber:N0} to {negativeHex} back to {negativeNumber2:N0}."); - Console.WriteLine($"Converted {positiveNumber:N0} to {positiveHex} back to {positiveNumber2:N0}."); - // The example displays the following output: - // Converted -1,000,000 to F0BDC0 back to -1,000,000. - // Converted 15,777,216 to 0F0BDC0 back to 15,777,216. - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples2.cs deleted file mode 100644 index d64472f7df290..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/ByteAndHex_Examples2.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -using System; -using System.Globalization; -using System.Numerics; - -public struct HexValue -{ - public int Sign; - public string Value; -} - -public class ByteHexExample2 -{ - public static void Main() - { - uint positiveNumber = 4039543321; - int negativeNumber = -255423975; - - // Convert the numbers to hex strings. - HexValue hexValue1, hexValue2; - hexValue1.Value = positiveNumber.ToString("X"); - hexValue1.Sign = Math.Sign(positiveNumber); - - hexValue2.Value = Convert.ToString(negativeNumber, 16); - hexValue2.Sign = Math.Sign(negativeNumber); - - // Round-trip the hexadecimal values to BigInteger values. - string hexString; - BigInteger positiveBigInt, negativeBigInt; - - hexString = (hexValue1.Sign == 1 ? "0" : "") + hexValue1.Value; - positiveBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber); - Console.WriteLine($"Converted {positiveNumber} to {hexValue1.Value} and back to {positiveBigInt}."); - - hexString = (hexValue2.Sign == 1 ? "0" : "") + hexValue2.Value; - negativeBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber); - Console.WriteLine($"Converted {negativeNumber} to {hexValue2.Value} and back to {negativeBigInt}."); - } -} -// The example displays the following output: -// Converted 4039543321 to F0C68A19 and back to 4039543321. -// Converted -255423975 to f0c68a19 and back to -255423975. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Mutability_Examples.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Mutability_Examples.cs deleted file mode 100644 index 929cde2f07db5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Mutability_Examples.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Diagnostics; -using System.Numerics; - -public class MutabilityEx -{ - public static void Main() - { - ShowSimpleAdd(); - PerformBigIntegerOperation(); - PerformWithIntermediary(); - } - - private static void ShowSimpleAdd() - { - // - BigInteger number = BigInteger.Multiply(Int64.MaxValue, 3); - number++; - Console.WriteLine(number); - // - } - - private static void PerformBigIntegerOperation() - { - Stopwatch sw = Stopwatch.StartNew(); - - // - BigInteger number = Int64.MaxValue ^ 5; - int repetitions = 1000000; - // Perform some repetitive operation 1 million times. - for (int ctr = 0; ctr <= repetitions; ctr++) - { - // Perform some operation. If it fails, exit the loop. - if (!SomeOperationSucceeds()) break; - // The following code executes if the operation succeeds. - number++; - } - // - - sw.Stop(); - Console.WriteLine("Incrementing a BigInteger: " + sw.Elapsed.ToString()); - } - - private static void PerformWithIntermediary() - { - Stopwatch sw = Stopwatch.StartNew(); - - // - BigInteger number = Int64.MaxValue ^ 5; - int repetitions = 1000000; - int actualRepetitions = 0; - // Perform some repetitive operation 1 million times. - for (int ctr = 0; ctr <= repetitions; ctr++) - { - // Perform some operation. If it fails, exit the loop. - if (!SomeOperationSucceeds()) break; - // The following code executes if the operation succeeds. - actualRepetitions++; - } - number += actualRepetitions; - // - - sw.Stop(); - Console.WriteLine("Incrementing a BigInteger: " + sw.Elapsed.ToString()); - } - - private static bool SomeOperationSucceeds() - { - return true; - } -} - -// -// CAPS bug: snippet2 is seen as duplicated, even though it isn't. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/BigInteger_Examples.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/BigInteger_Examples.vb deleted file mode 100644 index 7416d8050f4fe..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/BigInteger_Examples.vb +++ /dev/null @@ -1,86 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.Numerics - -Module Example1 - Public Sub Main() - ' - Dim bigIntFromDouble As New BigInteger(179032.6541) - Console.WriteLine(bigIntFromDouble) - Dim bigIntFromInt64 As New BigInteger(934157136952) - Console.WriteLine(bigIntFromInt64) - ' The example displays the following output: - ' 179032 - ' 934157136952 - ' - - Console.WriteLine() - - ' - Dim longValue As Long = 6315489358112 - Dim assignedFromLong As BigInteger = longValue - Console.WriteLine(assignedFromLong) - ' The example displays the following output: - ' 6315489358112 - ' - - Console.WriteLine() - - ' - Dim assignedFromDouble As BigInteger = CType(179032.6541, BigInteger) - Console.WriteLine(assignedFromDouble) - Dim assignedFromDecimal As BigInteger = CType(64312.65D, BigInteger) - Console.WriteLine(assignedFromDecimal) - ' The example displays the following output: - ' 179032 - ' 64312 - ' - - Console.WriteLine() - - ' - Dim byteArray() As Byte = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} - Dim newBigInt As New BigInteger(byteArray) - Console.WriteLine("The value of newBigInt is {0} (or 0x{0:x}).", newBigInt) - ' The example displays the following output: - ' The value of newBigInt is 4759477275222530853130 (or 0x102030405060708090a). - ' - - Console.WriteLine() - - ' - Dim positiveString As String = "91389681247993671255432112000000" - Dim negativeString As String = "-90315837410896312071002088037140000" - Dim posBigInt As BigInteger = 0 - Dim negBigInt As BigInteger = 0 - - Try - posBigInt = BigInteger.Parse(positiveString) - Console.WriteLine(posBigInt) - Catch e As FormatException - Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.", - positiveString) - End Try - - If BigInteger.TryParse(negativeString, negBigInt) Then - Console.WriteLine(negBigInt) - Else - Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.", - negativeString) - End If - ' The example displays the following output: - ' 9.1389681247993671255432112E+31 - ' -9.0315837410896312071002088037E+34 - ' - - Console.WriteLine() - - ' - Dim number As BigInteger = BigInteger.Pow(UInt64.MaxValue, 3) - Console.WriteLine(number) - ' The example displays the following output: - ' 6277101735386680762814942322444851025767571854389858533375 - ' - End Sub -End Module diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples.vb deleted file mode 100644 index 3cf3022a05fa9..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples.vb +++ /dev/null @@ -1,154 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.Globalization -Imports System.Numerics - -Module Example - Public Sub Main() - RoundtripBigInteger() - Console.WriteLIne() - RoundtripInt16() - Console.WriteLine() - HandleSignsInByteArray() - Console.WriteLine() - RoundtripAmbiguous() - Console.WriteLine() - RoundtripWithHex() - Console.WriteLine() - End Sub - - Private Sub RoundTripBigInteger() - Console.WriteLine("Round-trip bytes") - - ' - Dim number As BigInteger = BigInteger.Pow(Int64.MaxValue, 2) - Console.WriteLine(number) - - ' Write the BigInteger value to a byte array. - Dim bytes() As Byte = number.ToByteArray() - - ' Display the byte array. - For Each byteValue As Byte In bytes - Console.Write("0x{0:X2} ", byteValue) - Next - Console.WriteLine() - - ' Restore the BigInteger value from a Byte array. - Dim newNumber As BigInteger = New BigInteger(bytes) - Console.WriteLine(newNumber) - ' The example displays the following output: - ' 8.5070591730234615847396907784E+37 - ' 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x3F - ' - ' 8.5070591730234615847396907784E+37 - ' - End Sub - - Private Sub RoundTripInt16() - Console.WriteLine() - Console.WriteLine("Round-trip an Int16 value:") - ' - Dim originalValue As Short = 30000 - Console.WriteLine(originalValue) - - ' Convert the Int16 value to a byte array. - Dim bytes() As Byte = BitConverter.GetBytes(originalValue) - - ' Display the byte array. - For Each byteValue As Byte In bytes - Console.Write("0x{0} ", byteValue.ToString("X2")) - Next - Console.WriteLine() - - ' Pass byte array to the BigInteger constructor. - Dim number As BigInteger = New BigInteger(bytes) - Console.WriteLine(number) - ' The example displays the following output: - ' 30000 - ' 0x30 0x75 - ' 30000 - ' - End Sub - - PRivate Sub HandleSignsInByteArray() - ' - Dim negativeNumber As Integer = -1000000 - Dim positiveNumber As UInteger = 4293967296 - - Dim negativeBytes() As Byte = BitConverter.GetBytes(negativeNumber) - Dim negativeBigInt As New BigInteger(negativeBytes) - Console.WriteLine(negativeBigInt.ToString("N0")) - - Dim tempPosBytes() As Byte = BitConverter.GetBytes(positiveNumber) - Dim positiveBytes(tempposBytes.Length) As Byte - Array.Copy(tempPosBytes, positiveBytes, tempPosBytes.Length) - Dim positiveBigInt As New BigInteger(positiveBytes) - Console.WriteLine(positiveBigInt.ToString("N0")) - ' The example displays the following output: - ' -1,000,000 - ' 4,293,967,296 - ' - End Sub - - Private Sub RoundtripAmbiguous() - ' - Dim positiveValue As BigInteger = 15777216 - Dim negativeValue As BigInteger = -1000000 - - Console.WriteLine("Positive value: " + positiveValue.ToString("N0")) - Dim bytes() As Byte = positiveValue.ToByteArray() - For Each byteValue As Byte In bytes - Console.Write("{0:X2} ", byteValue) - Next - Console.WriteLine() - positiveValue = New BigInteger(bytes) - Console.WriteLine("Restored positive value: " + positiveValue.ToString("N0")) - - Console.WriteLine() - - Console.WriteLIne("Negative value: " + negativeValue.ToString("N0")) - bytes = negativeValue.ToByteArray() - For Each byteValue As Byte In bytes - Console.Write("{0:X2} ", byteValue) - Next - Console.WriteLine() - negativeValue = New BigInteger(bytes) - Console.WriteLine("Restored negative value: " + negativeValue.ToString("N0")) - ' The example displays the following output: - ' Positive value: 15,777,216 - ' C0 BD F0 00 - ' Restored positive value: 15,777,216 - ' - ' Negative value: -1,000,000 - ' C0 BD F0 - ' Restored negative value: -1,000,000 - ' - End Sub - - Private Sub RoundtripWithHex() - ' - Dim negativeNumber As BigInteger = -1000000 - Dim positiveNumber As BigInteger = 15777216 - - Dim negativeHex As String = negativeNumber.ToString("X") - Dim positiveHex As string = positiveNumber.ToString("X") - - Dim negativeNumber2, positiveNumber2 As BigInteger - negativeNumber2 = BigInteger.Parse(negativeHex, - NumberStyles.HexNumber) - positiveNumber2 = BigInteger.Parse(positiveHex, - NumberStyles.HexNumber) - - Console.WriteLine("Converted {0:N0} to {1} back to {2:N0}.", - negativeNumber, negativeHex, negativeNumber2) - Console.WriteLine("Converted {0:N0} to {1} back to {2:N0}.", - positiveNumber, positiveHex, positiveNumber2) - ' The example displays the following output: - ' Converted -1,000,000 to F0BDC0 back to -1,000,000. - ' Converted 15,777,216 to 0F0BDC0 back to 15,777,216. - ' - End Sub - -End Module - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples2.vb deleted file mode 100644 index 6f649590f1ced..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/ByteAndHex_Examples2.vb +++ /dev/null @@ -1,45 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Numerics - -Public Structure HexValue - Public Sign As Integer - Public Value As String -End Structure - -Module Example2 - Public Sub Main() - Dim positiveNumber As UInteger = 4039543321 - Dim negativeNumber As Integer = -255423975 - - ' Convert the numbers to hex strings. - Dim hexValue1, hexValue2 As HexValue - hexValue1.Value = positiveNumber.ToString("X") - hexValue1.Sign = Math.Sign(positiveNumber) - - hexValue2.Value = Convert.ToString(negativeNumber, 16) - hexValue2.Sign = Math.Sign(negativeNumber) - - ' Round-trip the hexadecimal values to BigInteger values. - Dim hexString As String - Dim positiveBigInt, negativeBigInt As BigInteger - - hexString = CStr(IIf(hexValue1.Sign = 1, "0", "")) + hexValue1.Value - positiveBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber) - Console.WriteLine("Converted {0} to {1} and back to {2}.", - positiveNumber, hexValue1.Value, positiveBigInt) - - hexString = CStr(IIf(hexValue2.Sign = 1, "0", "")) + hexValue2.Value - negativeBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber) - Console.WriteLine("Converted {0} to {1} and back to {2}.", - negativeNumber, hexValue2.Value, negativeBigInt) - - End Sub -End Module -' The example displays the following output: -' Converted 4039543321 to F0C68A19 and back to 4039543321. -' Converted -255423975 to f0c68a19 and back to -255423975. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Mutability_Examples.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Mutability_Examples.vb deleted file mode 100644 index 015b627a072b3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Mutability_Examples.vb +++ /dev/null @@ -1,69 +0,0 @@ -' Visual Basic .NET Document -'Option Strict On - -Imports System.Diagnostics -Imports System.Numerics - -Module Example3 - Public Sub Main() - ShowSimpleAdd() - PerformBigIntegerOperation() - PerformWithIntermediary() - End Sub - - Private Sub ShowSimpleAdd() - ' - Dim number As BigInteger = BigInteger.Multiply(Int64.MaxValue, 3) - number += 1 - Console.WriteLine(number) - ' - End Sub - - Private Sub PerformBigIntegerOperation() - Dim sw As Stopwatch = Stopwatch.StartNew() - - ' - Dim number As BigInteger = Int64.MaxValue ^ 5 - Dim repetitions As Integer = 1000000 - ' Perform some repetitive operation 1 million times. - For ctr As Integer = 0 To repetitions - ' Perform some operation. If it fails, exit the loop. - If Not SomeOperationSucceeds() Then Exit For - ' The following code executes if the operation succeeds. - number += 1 - Next - ' - - sw.Stop() - Console.WriteLine("Incrementing a BigInteger: " + sw.Elapsed.ToString()) - End Sub - - Private Sub PerformWithIntermediary() - Dim sw As Stopwatch = Stopwatch.StartNew() - - ' - Dim number As BigInteger = Int64.MaxValue ^ 5 - Dim repetitions As Integer = 1000000 - Dim actualRepetitions As Integer = 0 - ' Perform some repetitive operation 1 million times. - For ctr As Integer = 0 To repetitions - ' Perform some operation. If it fails, exit the loop. - If Not SomeOperationSucceeds() Then Exit For - ' The following code executes if the operation succeeds. - actualRepetitions += 1 - Next - number += actualRepetitions - ' - - sw.Stop() - Console.WriteLine("Incrementing a BigInteger: " + sw.Elapsed.ToString()) - End Sub - - Private Function SomeOperationSucceeds() As Boolean - Return True - End Function -End Module - -' -' CAPS bug: snippet2 is seen as duplicated, even though it isn't. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/BigInteger/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Program.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Program.cs deleted file mode 100644 index 99e6662d51bc0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Program.cs +++ /dev/null @@ -1 +0,0 @@ -CustomFormatEx.Run(); diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Project.csproj deleted file mode 100644 index f99395b4b2b39..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/create1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/create1.cs deleted file mode 100644 index 10d20d59111f9..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/create1.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Numerics; - -public class CreateEx -{ - public static void Run() - { - // Create a complex number by calling its class constructor. - Complex c1 = new Complex(12, 6); - Console.WriteLine(c1); - - // Assign a Double to a complex number. - Complex c2 = 3.14; - Console.WriteLine(c2); - - // Cast a Decimal to a complex number. - Complex c3 = (Complex)12.3m; - Console.WriteLine(c3); - - // Assign the return value of a method to a Complex variable. - Complex c4 = Complex.Pow(Complex.One, -1); - Console.WriteLine(c4); - - // Assign the value returned by an operator to a Complex variable. - Complex c5 = Complex.One + Complex.One; - Console.WriteLine(c5); - - // Instantiate a complex number from its polar coordinates. - Complex c6 = Complex.FromPolarCoordinates(10, .524); - Console.WriteLine(c6); - } -} -// The example displays the following output: -// (12, 6) -// (3.14, 0) -// (12.3, 0) -// (1, 0) -// (2, 0) -// (8.65824721882145, 5.00347430269914) -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/customfmt1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/customfmt1.cs deleted file mode 100644 index 6040075babea1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/customfmt1.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -using System; -using System.Numerics; - -public class ComplexFormatter : IFormatProvider, ICustomFormatter -{ - public object GetFormat(Type formatType) - { - if (formatType == typeof(ICustomFormatter)) - return this; - else - return null; - } - - public string Format(string format, object arg, - IFormatProvider provider) - { - if (arg is Complex c1) - { - // Check if the format string has a precision specifier. - int precision; - string fmtString = string.Empty; - if (format.Length > 1) - { - try - { - precision = int.Parse(format.Substring(1)); - } - catch (FormatException) - { - precision = 0; - } - fmtString = "N" + precision.ToString(); - } - if (format.Substring(0, 1).Equals("I", StringComparison.OrdinalIgnoreCase)) - { - // Determine the sign to display. - char sign = c1.Imaginary < 0 ? '-' : '+'; - // Display the determined sign and the absolute value of the imaginary part. - return c1.Real.ToString(fmtString) + " " + sign + " " + Math.Abs(c1.Imaginary).ToString(fmtString) + "i"; - } - else if (format.Substring(0, 1).Equals("J", StringComparison.OrdinalIgnoreCase)) - { - // Determine the sign to display. - char sign = c1.Imaginary < 0 ? '-' : '+'; - // Display the determined sign and the absolute value of the imaginary part. - return c1.Real.ToString(fmtString) + " " + sign + " " + Math.Abs(c1.Imaginary).ToString(fmtString) + "j"; - } - else - return c1.ToString(format, provider); - } - else - { - if (arg is IFormattable formattable) - return formattable.ToString(format, provider); - else if (arg != null) - return arg.ToString(); - else - return string.Empty; - } - } -} -// - -// -public class CustomFormatEx -{ - public static void Run() - { - Complex c1 = new(12.1, 15.4); - Console.WriteLine($"Formatting with ToString: {c1}"); - Console.WriteLine($"Formatting with ToString(format): {c1:N2}"); - Console.WriteLine($"Custom formatting with I0:\t" + - $" {string.Format(new ComplexFormatter(), "{0:I0}", c1)}"); - Console.WriteLine($"Custom formatting with J3:\t" + - $" {string.Format(new ComplexFormatter(), "{0:J3}", c1)}"); - } -} - -// The example displays the following output: -// Formatting with ToString(): <12.1; 15.4> -// Formatting with ToString(format): <12.10; 15.40> -// Custom formatting with I0: 12 + 15i -// Custom formatting with J3: 12.100 + 15.400j -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/nan1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/nan1.cs deleted file mode 100644 index c91485224155b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/nan1.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -using System; -using System.Numerics; - -public class NaNEx -{ - public static void Run() - { - Complex c1 = new Complex(Double.MaxValue / 2, Double.MaxValue / 2); - - Complex c2 = c1 / Complex.Zero; - Console.WriteLine(c2.ToString()); - c2 = c2 * new Complex(1.5, 1.5); - Console.WriteLine(c2.ToString()); - Console.WriteLine(); - - Complex c3 = c1 * new Complex(2.5, 3.5); - Console.WriteLine(c3.ToString()); - c3 = c3 + new Complex(Double.MinValue / 2, Double.MaxValue / 2); - Console.WriteLine(c3); - } -} -// The example displays the following output: -// (NaN, NaN) -// (NaN, NaN) -// (NaN, Infinity) -// (NaN, Infinity) -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/precision1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/precision1.cs deleted file mode 100644 index c2e851c3b5a49..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/csharp/precision1.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Numerics; - -public class PrecisionEx -{ - public static void Run() - { - // - Complex value = new Complex(Double.MinValue / 2, Double.MinValue / 2); - Complex value2 = Complex.Exp(Complex.Log(value)); - Console.WriteLine($"{value} \n{value2} \nEqual: {value == value2}"); - // The example displays the following output: - // (-8.98846567431158E+307, -8.98846567431158E+307) - // (-8.98846567431161E+307, -8.98846567431161E+307) - // Equal: False - // - - Console.WriteLine(); - ShowPlatform(); - } - - private static void ShowPlatform() - { - // - Complex minusOne = new Complex(-1, 0); - Console.WriteLine(Complex.Sqrt(minusOne)); - // The example displays the following output: - // (6.12303176911189E-17, 1) on 32-bit systems. - // (6.12323399573677E-17,1) on IA64 systems. - // - } -} - -// Complex minusOne = new Complex(-1,0); -// Complex.Sqrt(minusOne) returns Complex(6.12303176911189E-17, 1) where as it returns Complex on IA64. diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Program.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Program.vb deleted file mode 100644 index 8cd0a0ebcc1ee..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Program.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class Program - Public Shared Sub Main() - Example2.Run() - End Sub -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Project.vbproj deleted file mode 100644 index f99395b4b2b39..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/create1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/create1.vb deleted file mode 100644 index fdfaf39259663..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/create1.vb +++ /dev/null @@ -1,41 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Numerics - -Module Example - Public Sub Run() - ' Create a complex number by calling its class constructor. - Dim c1 As New Complex(12, 6) - Console.WriteLine(c1) - - ' Assign a Double to a complex number. - Dim c2 As Complex = 3.14 - Console.WriteLine(c2) - - ' Cast a Decimal to a complex number. - Dim c3 As Complex = CType(12.3d, Complex) - Console.WriteLine(c3) - - ' Assign the return value of a method to a Complex variable. - Dim c4 As Complex = Complex.Pow(Complex.One, -1) - Console.WriteLine(c4) - - ' Assign the value returned by an operator to a Complex variable. - Dim c5 As Complex = Complex.One + Complex.One - Console.WriteLine(c5) - - ' Instantiate a complex number from its polar coordinates. - Dim c6 As Complex = Complex.FromPolarCoordinates(10, .524) - Console.WriteLine(c6) - End Sub -End Module -' The example displays the following output: -' (12, 6) -' (3.14, 0) -' (12.3000001907349, 0) -' (1, 0) -' (2, 0) -' (8.65824721882145, 5.00347430269914) -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/customfmt1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/customfmt1.vb deleted file mode 100644 index 61ee5de6b18c6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/customfmt1.vb +++ /dev/null @@ -1,76 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Numerics - -Public Class ComplexFormatter - Implements IFormatProvider, ICustomFormatter - - Public Function GetFormat(formatType As Type) As Object _ - Implements IFormatProvider.GetFormat - If formatType Is GetType(ICustomFormatter) Then - Return Me - Else - Return Nothing - End If - End Function - - Public Function Format(fmt As String, arg As Object, - provider As IFormatProvider) As String _ - Implements ICustomFormatter.Format - If TypeOf arg Is Complex Then - Dim c1 As Complex = DirectCast(arg, Complex) - ' Check if the format string has a precision specifier. - Dim precision As Integer - Dim fmtString As String = String.Empty - If fmt.Length > 1 Then - Try - precision = Integer.Parse(fmt.Substring(1)) - Catch e As FormatException - precision = 0 - End Try - fmtString = "N" + precision.ToString() - End If - ' Determine the sign to display. - Dim sign As Char = If(c1.Imaginary < 0.0, "-"c, "+"c) - ' Display the determined sign and the absolute value of the imaginary part. - If fmt.Substring(0, 1).Equals("I", StringComparison.OrdinalIgnoreCase) Then - Return c1.Real.ToString(fmtString) + " " + sign + " " + Math.Abs(c1.Imaginary).ToString(fmtString) + "i" - ElseIf fmt.Substring(0, 1).Equals("J", StringComparison.OrdinalIgnoreCase) Then - Return c1.Real.ToString(fmtString) + " " + sign + " " + Math.Abs(c1.Imaginary).ToString(fmtString) + "j" - Else - Return c1.ToString(fmt, provider) - End If - Else - If TypeOf arg Is IFormattable Then - Return DirectCast(arg, IFormattable).ToString(fmt, provider) - ElseIf arg IsNot Nothing Then - Return arg.ToString() - Else - Return String.Empty - End If - End If - End Function -End Class -' - -' -Module Example2 - Public Sub Run() - Dim c1 As New Complex(12.1, 15.4) - Console.WriteLine($"Formatting with ToString(): {c1}") - Console.WriteLine($"Formatting with ToString(format): {c1:N2}") - Console.WriteLine($"Custom formatting with I0: " + - $"{String.Format(New ComplexFormatter(), "{0:I0}", c1)}") - Console.WriteLine($"Custom formatting with J3: " + - $"{String.Format(New ComplexFormatter(), "{0:J3}", c1)}") - End Sub -End Module - -' The example displays the following output: -' Formatting with ToString(): <12.1; 15.4> -' Formatting with ToString(format): <12.10; 15.40> -' Custom formatting with I0: 12 + 15i -' Custom formatting with J3: 12.100 + 15.400j -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/nan1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/nan1.vb deleted file mode 100644 index b794990719e2c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/nan1.vb +++ /dev/null @@ -1,29 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Numerics - -Module Example4 - Public Sub Run() - Dim c1 As Complex = New Complex(Double.MaxValue / 2, Double.MaxValue / 2) - - Dim c2 As Complex = c1 / Complex.Zero - Console.WriteLine(c2.ToString()) - c2 = c2 * New Complex(1.5, 1.5) - Console.WriteLine(c2.ToString()) - Console.WriteLine() - - Dim c3 As Complex = c1 * New Complex(2.5, 3.5) - Console.WriteLine(c3.ToString()) - c3 = c3 + New Complex(Double.MinValue / 2, Double.MaxValue / 2) - Console.WriteLine(c3) - End Sub -End Module -' The example displays the following output: -' (NaN, NaN) -' (NaN, NaN) -' -' (NaN, Infinity) -' (NaN, Infinity) -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/precision1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/precision1.vb deleted file mode 100644 index 32247a08f2201..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Numerics/Complex/Overview/vb/precision1.vb +++ /dev/null @@ -1,35 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.Numerics - -Module Example3 - Public Sub Run() - ' - Dim value As New Complex(Double.MinValue / 2, Double.MinValue / 2) - Dim value2 As Complex = Complex.Exp(Complex.Log(value)) - Console.WriteLine("{0} {3}{1} {3}Equal: {2}", value, value2, - value = value2, - vbCrLf) - ' The example displays the following output: - ' (-8.98846567431158E+307, -8.98846567431158E+307) - ' (-8.98846567431161E+307, -8.98846567431161E+307) - ' Equal: False - ' - - Console.WriteLine() - ShowPlatform() - End Sub - - - Private Sub ShowPlatform() - ' - Dim minusOne As New Complex(-1, 0) - Console.WriteLine(Complex.Sqrt(minusOne)) - ' The example displays the following output: - ' (6.12303176911189E-17, 1) on 32-bit systems. - ' (6.12323399573677E-17,1) on IA64 systems. - ' - End Sub -End Module - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/Project.csproj deleted file mode 100644 index a369cfa8a8090..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source.cs b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source.cs deleted file mode 100644 index 80fb4ba4ff306..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source.cs +++ /dev/null @@ -1,145 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; - -// These classes are for demonstration purposes. -// -public class Example -{ - private int id = 0; - public Example(int id) - { - this.id = id; - } - public int ID { get { return id; }} -} - -public class DerivedFromExample : Example -{ - public DerivedFromExample(int id) : base(id) {} -} - -// Two delegates are declared: UseLikeInstance treats the dynamic -// method as if it were an instance method, and UseLikeStatic -// treats the dynamic method in the ordinary fashion. -// -public delegate int UseLikeInstance(int newID); -public delegate int UseLikeStatic(Example ex, int newID); - -public class Demo -{ - public static void Main() - { - // This dynamic method changes the private id field. It has - // no name; it returns the old id value (return type int); - // it takes two parameters, an instance of Example and - // an int that is the new value of id; and it is declared - // with Example as the owner type, so it can access all - // members, public and private. - // - DynamicMethod changeID = new DynamicMethod( - "", - typeof(int), - new Type[] { typeof(Example), typeof(int) }, - typeof(Example) - ); - - // Get a FieldInfo for the private field 'id'. - FieldInfo fid = typeof(Example).GetField( - "id", - BindingFlags.NonPublic | BindingFlags.Instance - ); - - ILGenerator ilg = changeID.GetILGenerator(); - - // Push the current value of the id field onto the - // evaluation stack. It's an instance field, so load the - // instance of Example before accessing the field. - ilg.Emit(OpCodes.Ldarg_0); - ilg.Emit(OpCodes.Ldfld, fid); - - // Load the instance of Example again, load the new value - // of id, and store the new field value. - ilg.Emit(OpCodes.Ldarg_0); - ilg.Emit(OpCodes.Ldarg_1); - ilg.Emit(OpCodes.Stfld, fid); - - // The original value of the id field is now the only - // thing on the stack, so return from the call. - ilg.Emit(OpCodes.Ret); - - // Create a delegate that uses changeID in the ordinary - // way, as a static method that takes an instance of - // Example and an int. - // - UseLikeStatic uls = - (UseLikeStatic) changeID.CreateDelegate( - typeof(UseLikeStatic) - ); - - // Create an instance of Example with an id of 42. - // - Example ex = new Example(42); - - // Create a delegate that is bound to the instance of - // of Example. This is possible because the first - // parameter of changeID is of type Example. The - // delegate has all the parameters of changeID except - // the first. - UseLikeInstance uli = - (UseLikeInstance) changeID.CreateDelegate( - typeof(UseLikeInstance), - ex - ); - - // First, change the value of id by calling changeID as - // a static method, passing in the instance of Example. - // - Console.WriteLine( - "Change the value of id; previous value: {0}", - uls(ex, 1492) - ); - - // Change the value of id again using the delegate bound - // to the instance of Example. - // - Console.WriteLine( - "Change the value of id; previous value: {0}", - uli(2700) - ); - - Console.WriteLine("Final value of id: {0}", ex.ID); - - // Now repeat the process with a class that derives - // from Example. - // - DerivedFromExample dfex = new DerivedFromExample(71); - - uli = (UseLikeInstance) changeID.CreateDelegate( - typeof(UseLikeInstance), - dfex - ); - - Console.WriteLine( - "Change the value of id; previous value: {0}", - uls(dfex, 73) - ); - Console.WriteLine( - "Change the value of id; previous value: {0}", - uli(79) - ); - Console.WriteLine("Final value of id: {0}", dfex.ID); - } -} - -/* This code example produces the following output: - -Change the value of id; previous value: 42 -Change the value of id; previous value: 1492 -Final value of id: 2700 -Change the value of id; previous value: 71 -Change the value of id; previous value: 73 -Final value of id: 79 - */ -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source1.cs deleted file mode 100644 index c66da33c26c77..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/csharp/source1.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; - -public class Test -{ - // Declare a delegate that will be used to execute the completed - // dynamic method. - private delegate int HelloInvoker(string msg, int ret); - - public static void Main() - { - // Create an array that specifies the types of the parameters - // of the dynamic method. This method has a string parameter - // and an int parameter. - Type[] helloArgs = {typeof(string), typeof(int)}; - - // Create a dynamic method with the name "Hello", a return type - // of int, and two parameters whose types are specified by the - // array helloArgs. Create the method in the module that - // defines the Test class. - DynamicMethod hello = new DynamicMethod("Hello", - typeof(int), - helloArgs, - typeof(Test).Module); - - // - // Create an array that specifies the parameter types of the - // overload of Console.WriteLine to be used in Hello. - Type[] writeStringArgs = {typeof(string)}; - // Get the overload of Console.WriteLine that has one - // String parameter. - MethodInfo writeString = - typeof(Console).GetMethod("WriteLine", writeStringArgs); - - // Get an ILGenerator and emit a body for the dynamic method. - ILGenerator il = hello.GetILGenerator(); - // Load the first argument, which is a string, onto the stack. - il.Emit(OpCodes.Ldarg_0); - // Call the overload of Console.WriteLine that prints a string. - il.EmitCall(OpCodes.Call, writeString, null); - // The Hello method returns the value of the second argument; - // to do this, load the second argument onto the stack and return. - il.Emit(OpCodes.Ldarg_1); - il.Emit(OpCodes.Ret); - // - - // - // Create a delegate that represents the dynamic method. This - // action completes the method. Further attempts to change the - // method are ignored and no exception is thrown. - HelloInvoker hi = - (HelloInvoker) hello.CreateDelegate(typeof(HelloInvoker)); - // - - // Use the delegate to execute the dynamic method. Save and - // print the return value. - int retval = hi("\r\nHello, World!", 42); - Console.WriteLine("Executing delegate hi(\"Hello, World!\", 42) returned {0}", - retval); - - // Do it again, with different arguments. - retval = hi("\r\nHi, Mom!", 5280); - Console.WriteLine("Executing delegate hi(\"Hi, Mom!\", 5280) returned {0}", - retval); - - // - // Create an array of arguments to use with the Invoke method. - object[] invokeArgs = {"\r\nHello, World!", 42}; - // Invoke the dynamic method using the arguments. This is much - // slower than using the delegate, because you must create an - // array to contain the arguments, and ValueType arguments - // must be boxed. - object objRet = hello.Invoke(null, invokeArgs); - Console.WriteLine("hello.Invoke returned {0}", objRet); - // - } -} -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/Project.vbproj deleted file mode 100644 index a369cfa8a8090..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source.vb b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source.vb deleted file mode 100644 index 4daa8540d9153..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source.vb +++ /dev/null @@ -1,157 +0,0 @@ -' -Imports System.Reflection -Imports System.Reflection.Emit - -' These classes are for demonstration purposes. -' -Public Class Example - Private _id As Integer = 0 - - Public Sub New(ByVal newId As Integer) - _id = newId - End Sub - - Public ReadOnly Property ID() As Integer - Get - Return _id - End Get - End Property -End Class - -Public Class DerivedFromExample - Inherits Example - - Public Sub New(ByVal newId As Integer) - MyBase.New(newId) - End Sub -End Class - -' Two delegates are declared: UseLikeInstance treats the dynamic -' method as if it were an instance method, and UseLikeStatic -' treats the dynamic method in the ordinary fashion. -' -Public Delegate Function UseLikeInstance(ByVal newID As Integer) _ - As Integer -Public Delegate Function UseLikeStatic(ByVal ex As Example, _ - ByVal newID As Integer) As Integer - -Public Class Demo - - Public Shared Sub Main() - ' This dynamic method changes the private _id field. It - ' has no name; it returns the old _id value (return type - ' Integer); it takes two parameters, an instance of Example - ' and an Integer that is the new value of _id; and it is - ' declared with Example as the owner type, so it can - ' access all members, public and private. - ' - Dim changeID As New DynamicMethod( _ - "", _ - GetType(Integer), _ - New Type() {GetType(Example), GetType(Integer)}, _ - GetType(Example) _ - ) - - ' Get a FieldInfo for the private field '_id'. - Dim fid As FieldInfo = GetType(Example).GetField( _ - "_id", _ - BindingFlags.NonPublic Or BindingFlags.Instance _ - ) - - Dim ilg As ILGenerator = changeID.GetILGenerator() - - ' Push the current value of the id field onto the - ' evaluation stack. It's an instance field, so load the - ' instance of Example before accessing the field. - ilg.Emit(OpCodes.Ldarg_0) - ilg.Emit(OpCodes.Ldfld, fid) - - ' Load the instance of Example again, load the new value - ' of id, and store the new field value. - ilg.Emit(OpCodes.Ldarg_0) - ilg.Emit(OpCodes.Ldarg_1) - ilg.Emit(OpCodes.Stfld, fid) - - ' The original value of the id field is now the only - ' thing on the stack, so return from the call. - ilg.Emit(OpCodes.Ret) - - - ' Create a delegate that uses changeID in the ordinary - ' way, as a static method that takes an instance of - ' Example and an Integer. - ' - Dim uls As UseLikeStatic = CType( _ - changeID.CreateDelegate(GetType(UseLikeStatic)), _ - UseLikeStatic _ - ) - - ' Create an instance of Example with an id of 42. - ' - Dim ex As New Example(42) - - ' Create a delegate that is bound to the instance of - ' of Example. This is possible because the first - ' parameter of changeID is of type Example. The - ' delegate has all the parameters of changeID except - ' the first. - Dim uli As UseLikeInstance = CType( _ - changeID.CreateDelegate( _ - GetType(UseLikeInstance), _ - ex), _ - UseLikeInstance _ - ) - - ' First, change the value of _id by calling changeID as - ' a static method, passing in the instance of Example. - ' - Console.WriteLine( _ - "Change the value of _id; previous value: {0}", _ - uls(ex, 1492) _ - ) - - ' Change the value of _id again using the delegate - ' bound to the instance of Example. - ' - Console.WriteLine( _ - "Change the value of _id; previous value: {0}", _ - uli(2700) _ - ) - - Console.WriteLine("Final value of _id: {0}", ex.ID) - - - ' Now repeat the process with a class that derives - ' from Example. - ' - Dim dfex As New DerivedFromExample(71) - - uli = CType( _ - changeID.CreateDelegate( _ - GetType(UseLikeInstance), _ - dfex), _ - UseLikeInstance _ - ) - - Console.WriteLine( _ - "Change the value of _id; previous value: {0}", _ - uls(dfex, 73) _ - ) - Console.WriteLine( _ - "Change the value of _id; previous value: {0}", _ - uli(79) _ - ) - Console.WriteLine("Final value of _id: {0}", dfex.ID) - - End Sub -End Class - -' This code example produces the following output: -' -'Change the value of _id; previous value: 42 -'Change the value of _id; previous value: 1492 -'Final value of _id: 2700 -'Change the value of _id; previous value: 71 -'Change the value of _id; previous value: 73 -'Final value of _id: 79' -' \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source1.vb deleted file mode 100644 index 4f699871bbf82..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/.ctor/vb/source1.vb +++ /dev/null @@ -1,92 +0,0 @@ -' -Imports System.Reflection -Imports System.Reflection.Emit - -Public Class Test - ' Declare a delegate that will be used to execute the completed - ' dynamic method. - Private Delegate Function HelloInvoker(ByVal msg As String, _ - ByVal ret As Integer) As Integer - - Public Shared Sub Main() - ' Create an array that specifies the types of the parameters - ' of the dynamic method. This method has a String parameter - ' and an Integer parameter. - Dim helloArgs() As Type = {GetType(String), GetType(Integer)} - - ' Create a dynamic method with the name "Hello", a return type - ' of Integer, and two parameters whose types are specified by - ' the array helloArgs. Create the method in the module that - ' defines the Test class. - Dim hello As New DynamicMethod("Hello", _ - GetType(Integer), _ - helloArgs, _ - GetType(Test).Module) - - ' - ' Create an array that specifies the parameter types of the - ' overload of Console.WriteLine to be used in Hello. - Dim writeStringArgs() As Type = {GetType(String)} - ' Get the overload of Console.WriteLine that has one - ' String parameter. - Dim writeString As MethodInfo = GetType(Console). _ - GetMethod("WriteLine", writeStringArgs) - - ' Get an ILGenerator and emit a body for the dynamic method. - Dim il As ILGenerator = hello.GetILGenerator() - ' Load the first argument, which is a string, onto the stack. - il.Emit(OpCodes.Ldarg_0) - ' Call the overload of Console.WriteLine that prints a string. - il.EmitCall(OpCodes.Call, writeString, Nothing) - ' The Hello method returns the value of the second argument; - ' to do this, load the second argument onto the stack and return. - il.Emit(OpCodes.Ldarg_1) - il.Emit(OpCodes.Ret) - ' - - ' - ' Create a delegate that represents the dynamic method. This - ' action completes the method, and any further attempts to - ' change the method are ignored and don't throw an exception. - Dim hi As HelloInvoker = _ - hello.CreateDelegate(GetType(HelloInvoker)) - ' - - ' Use the delegate to execute the dynamic method. Save and - ' print the return value. - Dim retval As Integer = hi(vbCrLf & "Hello, World!", 42) - Console.WriteLine("Executing delegate hi(""Hello, World!"", 42) returned " _ - & retval) - - ' Do it again, with different arguments. - retval = hi(vbCrLf & "Hi, Mom!", 5280) - Console.WriteLine("Executing delegate hi(""Hi, Mom!"", 5280) returned " _ - & retval) - - ' - ' Create an array of arguments to use with the Invoke method. - Dim invokeArgs() As Object = {vbCrLf & "Hello, World!", 42} - ' Invoke the dynamic method using the arguments. This is much - ' slower than using the delegate, because you must create an - ' array to contain the arguments, and ValueType arguments - ' must be boxed. Note that this overload of Invoke is - ' inherited from MethodBase, and simply calls the more - ' complete overload of Invoke. - Dim objRet As Object = hello.Invoke(Nothing, invokeArgs) - Console.WriteLine("hello.Invoke returned " & objRet) - ' - End Sub -End Class - -' This code example produces the following output: -' -'Hello, World! -'Executing delegate hi("Hello, World!", 42) returned 42 -' -'Hi, Mom! -'Executing delegate hi("Hi, Mom!", 5280) returned 5280 -' -'Hello, World! -'hello.Invoke returned 42 -' -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/Project.csproj deleted file mode 100644 index a369cfa8a8090..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/source.cs b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/source.cs deleted file mode 100644 index b8249adec28c3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/csharp/source.cs +++ /dev/null @@ -1,256 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; -using System.Globalization; - -public class Test -{ - // Declare a delegate type that can be used to execute the completed - // dynamic method. - private delegate int HelloDelegate(string msg, int ret); - - public static void Main() - { - // Create an array that specifies the types of the parameters - // of the dynamic method. This dynamic method has a String - // parameter and an Integer parameter. - Type[] helloArgs = {typeof(string), typeof(int)}; - - // Create a dynamic method with the name "Hello", a return type - // of Integer, and two parameters whose types are specified by - // the array helloArgs. Create the method in the module that - // defines the String class. - DynamicMethod hello = new DynamicMethod("Hello", - typeof(int), - helloArgs, - typeof(string).Module); - - // - // Create an array that specifies the parameter types of the - // overload of Console.WriteLine to be used in Hello. - Type[] writeStringArgs = {typeof(string)}; - // Get the overload of Console.WriteLine that has one - // String parameter. - MethodInfo writeString = typeof(Console).GetMethod("WriteLine", - writeStringArgs); - - // Get an ILGenerator and emit a body for the dynamic method, - // using a stream size larger than the IL that will be - // emitted. - ILGenerator il = hello.GetILGenerator(256); - // Load the first argument, which is a string, onto the stack. - il.Emit(OpCodes.Ldarg_0); - // Call the overload of Console.WriteLine that prints a string. - il.EmitCall(OpCodes.Call, writeString, null); - // The Hello method returns the value of the second argument; - // to do this, load the second argument onto the stack and return. - il.Emit(OpCodes.Ldarg_1); - il.Emit(OpCodes.Ret); - // - - // - // Add parameter information to the dynamic method. (This is not - // necessary, but can be useful for debugging.) For each parameter, - // identified by position, supply the parameter attributes and a - // parameter name. - hello.DefineParameter(1, ParameterAttributes.In, "message"); - hello.DefineParameter(2, ParameterAttributes.In, "valueToReturn"); - // - - // - // Create a delegate that represents the dynamic method. This - // action completes the method. Any further attempts to - // change the method are ignored. - HelloDelegate hi = - (HelloDelegate) hello.CreateDelegate(typeof(HelloDelegate)); - - // Use the delegate to execute the dynamic method. - Console.WriteLine("\r\nUse the delegate to execute the dynamic method:"); - int retval = hi("\r\nHello, World!", 42); - Console.WriteLine("Invoking delegate hi(\"Hello, World!\", 42) returned: " + retval); - - // Execute it again, with different arguments. - retval = hi("\r\nHi, Mom!", 5280); - Console.WriteLine("Invoking delegate hi(\"Hi, Mom!\", 5280) returned: " + retval); - // - - // - Console.WriteLine("\r\nUse the Invoke method to execute the dynamic method:"); - // Create an array of arguments to use with the Invoke method. - object[] invokeArgs = {"\r\nHello, World!", 42}; - // Invoke the dynamic method using the arguments. This is much - // slower than using the delegate, because you must create an - // array to contain the arguments, and value-type arguments - // must be boxed. - object objRet = hello.Invoke(null, BindingFlags.ExactBinding, null, invokeArgs, new CultureInfo("en-us")); - Console.WriteLine("hello.Invoke returned: " + objRet); - // - - Console.WriteLine("\r\n ----- Display information about the dynamic method -----"); - // - // Display MethodAttributes for the dynamic method, set when - // the dynamic method was created. - Console.WriteLine("\r\nMethod Attributes: {0}", hello.Attributes); - // - - // - // Display the calling convention of the dynamic method, set when the - // dynamic method was created. - Console.WriteLine("\r\nCalling convention: {0}", hello.CallingConvention); - // - - // - // Display the declaring type, which is always null for dynamic - // methods. - if (hello.DeclaringType == null) - { - Console.WriteLine("\r\nDeclaringType is always null for dynamic methods."); - } - else - { - Console.WriteLine("DeclaringType: {0}", hello.DeclaringType); - } - // - - // - // Display the default value for InitLocals. - if (hello.InitLocals) - { - Console.Write("\r\nThis method contains verifiable code."); - } - else - { - Console.Write("\r\nThis method contains unverifiable code."); - } - Console.WriteLine(" (InitLocals = {0})", hello.InitLocals); - // - - // - // Display the module specified when the dynamic method was created. - Console.WriteLine("\r\nModule: {0}", hello.Module); - // - - // - // Display the name specified when the dynamic method was created. - // Note that the name can be blank. - Console.WriteLine("\r\nName: {0}", hello.Name); - // - - // - // For dynamic methods, the reflected type is always null. - if (hello.ReflectedType == null) - { - Console.WriteLine("\r\nReflectedType is null."); - } - else - { - Console.WriteLine("\r\nReflectedType: {0}", hello.ReflectedType); - } - // - - // - if (hello.ReturnParameter == null) - { - Console.WriteLine("\r\nMethod has no return parameter."); - } - else - { - Console.WriteLine("\r\nReturn parameter: {0}", hello.ReturnParameter); - } - // - - // - // If the method has no return type, ReturnType is System.Void. - Console.WriteLine("\r\nReturn type: {0}", hello.ReturnType); - // - - // - // ReturnTypeCustomAttributes returns an ICustomeAttributeProvider - // that can be used to enumerate the custom attributes of the - // return value. At present, there is no way to set such custom - // attributes, so the list is empty. - if (hello.ReturnType == typeof(void)) - { - Console.WriteLine("The method has no return type."); - } - else - { - ICustomAttributeProvider caProvider = hello.ReturnTypeCustomAttributes; - object[] returnAttributes = caProvider.GetCustomAttributes(true); - if (returnAttributes.Length == 0) - { - Console.WriteLine("\r\nThe return type has no custom attributes."); - } - else - { - Console.WriteLine("\r\nThe return type has the following custom attributes:"); - foreach( object attr in returnAttributes ) - { - Console.WriteLine("\t{0}", attr.ToString()); - } - } - } - // - - // - Console.WriteLine("\r\nToString: {0}", hello.ToString()); - // - - // - // Display parameter information. - ParameterInfo[] parameters = hello.GetParameters(); - Console.WriteLine("\r\nParameters: name, type, ParameterAttributes"); - foreach( ParameterInfo p in parameters ) - { - Console.WriteLine("\t{0}, {1}, {2}", - p.Name, p.ParameterType, p.Attributes); - } - // - } -} - -/* This code example produces the following output: - -Use the delegate to execute the dynamic method: - -Hello, World! -Invoking delegate hi("Hello, World!", 42) returned: 42 - -Hi, Mom! -Invoking delegate hi("Hi, Mom!", 5280) returned: 5280 - -Use the Invoke method to execute the dynamic method: - -Hello, World! -hello.Invoke returned: 42 - - ----- Display information about the dynamic method ----- - -Method Attributes: PrivateScope, Public, Static - -Calling convention: Standard - -DeclaringType is always null for dynamic methods. - -This method contains verifiable code. (InitLocals = True) - -Module: CommonLanguageRuntimeLibrary - -Name: Hello - -ReflectedType is null. - -Method has no return parameter. - -Return type: System.Int32 - -The return type has no custom attributes. - -ToString: Int32 Hello(System.String, Int32) - -Parameters: name, type, ParameterAttributes - message, System.String, In - valueToReturn, System.Int32, In - */ -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/Project.vbproj deleted file mode 100644 index a369cfa8a8090..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/source.vb b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/source.vb deleted file mode 100644 index ac1c66228dbe3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/DynamicMethod/Overview/vb/source.vb +++ /dev/null @@ -1,246 +0,0 @@ -' -Imports System.Reflection -Imports System.Reflection.Emit -Imports System.Globalization - -Public Class Test - ' Declare a delegate type that can be used to execute the completed - ' dynamic method. - Private Delegate Function HelloDelegate(ByVal msg As String, _ - ByVal ret As Integer) As Integer - - Public Shared Sub Main() - ' Create an array that specifies the types of the parameters - ' of the dynamic method. This dynamic method has a String - ' parameter and an Integer parameter. - Dim helloArgs() As Type = {GetType(String), GetType(Integer)} - - ' Create a dynamic method with the name "Hello", a return type - ' of Integer, and two parameters whose types are specified by - ' the array helloArgs. Create the method in the module that - ' defines the String class. - Dim hello As New DynamicMethod("Hello", _ - GetType(Integer), _ - helloArgs, _ - GetType(String).Module) - - ' - ' Create an array that specifies the parameter types of the - ' overload of Console.WriteLine to be used in Hello. - Dim writeStringArgs() As Type = {GetType(String)} - ' Get the overload of Console.WriteLine that has one - ' String parameter. - Dim writeString As MethodInfo = GetType(Console). _ - GetMethod("WriteLine", writeStringArgs) - - ' Get an ILGenerator and emit a body for the dynamic method, - ' using a stream size larger than the IL that will be - ' emitted. - Dim il As ILGenerator = hello.GetILGenerator(256) - ' Load the first argument, which is a string, onto the stack. - il.Emit(OpCodes.Ldarg_0) - ' Call the overload of Console.WriteLine that prints a string. - il.EmitCall(OpCodes.Call, writeString, Nothing) - ' The Hello method returns the value of the second argument; - ' to do this, load the second argument onto the stack and return. - il.Emit(OpCodes.Ldarg_1) - il.Emit(OpCodes.Ret) - ' - - ' - ' Add parameter information to the dynamic method. (This is not - ' necessary, but can be useful for debugging.) For each parameter, - ' identified by position, supply the parameter attributes and a - ' parameter name. - hello.DefineParameter(1, ParameterAttributes.In, "message") - hello.DefineParameter(2, ParameterAttributes.In, "valueToReturn") - ' - - ' - ' Create a delegate that represents the dynamic method. This - ' action completes the method. Any further attempts to - ' change the method are ignored. - Dim hi As HelloDelegate = _ - CType(hello.CreateDelegate(GetType(HelloDelegate)), HelloDelegate) - - ' Use the delegate to execute the dynamic method. - Console.WriteLine(vbCrLf & "Use the delegate to execute the dynamic method:") - Dim retval As Integer = hi(vbCrLf & "Hello, World!", 42) - Console.WriteLine("Invoking delegate hi(""Hello, World!"", 42) returned: " _ - & retval & ".") - - ' Execute it again, with different arguments. - retval = hi(vbCrLf & "Hi, Mom!", 5280) - Console.WriteLine("Invoking delegate hi(""Hi, Mom!"", 5280) returned: " _ - & retval & ".") - ' - - ' - Console.WriteLine(vbCrLf & "Use the Invoke method to execute the dynamic method:") - ' Create an array of arguments to use with the Invoke method. - Dim invokeArgs() As Object = {vbCrLf & "Hello, World!", 42} - ' Invoke the dynamic method using the arguments. This is much - ' slower than using the delegate, because you must create an - ' array to contain the arguments, and value-type arguments - ' must be boxed. - Dim objRet As Object = hello.Invoke(Nothing, _ - BindingFlags.ExactBinding, Nothing, invokeArgs, _ - New CultureInfo("en-us")) - Console.WriteLine("hello.Invoke returned: {0}", objRet) - ' - - Console.WriteLine(vbCrLf & _ - " ----- Display information about the dynamic method -----") - ' - ' Display MethodAttributes for the dynamic method, set when - ' the dynamic method was created. - Console.WriteLine(vbCrLf & "Method Attributes: {0}", _ - hello.Attributes) - ' - - ' - ' Display the calling convention of the dynamic method, set when the - ' dynamic method was created. - Console.WriteLine(vbCrLf & "Calling convention: {0}", _ - hello.CallingConvention) - ' - - ' - ' Display the declaring type, which is always Nothing for dynamic - ' methods. - If hello.DeclaringType Is Nothing Then - Console.WriteLine(vbCrLf & "DeclaringType is always Nothing for dynamic methods.") - Else - Console.WriteLine("DeclaringType: {0}", hello.DeclaringType) - End If - ' - - ' - ' Display the default value for InitLocals. - If hello.InitLocals Then - Console.Write(vbCrLf & "This method contains verifiable code.") - Else - Console.Write(vbCrLf & "This method contains unverifiable code.") - End If - Console.WriteLine(" (InitLocals = {0})", hello.InitLocals) - ' - - ' - ' Display the module specified when the dynamic method was created. - Console.WriteLine(vbCrLf & "Module: {0}", hello.Module) - ' - - ' - ' Display the name specified when the dynamic method was created. - ' Note that the name can be blank. - Console.WriteLine(vbCrLf & "Name: {0}", hello.Name) - ' - - ' - ' For dynamic methods, the reflected type is always Nothing. - If hello.ReflectedType Is Nothing Then - Console.WriteLine(vbCrLf & "ReflectedType is Nothing.") - Else - Console.WriteLine(vbCrLf & "ReflectedType: {0}", _ - hello.ReflectedType) - End If - ' - - ' - If hello.ReturnParameter Is Nothing Then - Console.WriteLine(vbCrLf & "Method has no return parameter.") - Else - Console.WriteLine(vbCrLf & "Return parameter: {0}", _ - hello.ReturnParameter) - End If - ' - - ' - ' If the method has no return type, ReturnType is System.Void. - Console.WriteLine(vbCrLf & "Return type: {0}", hello.ReturnType) - ' - - ' - ' ReturnTypeCustomAttributes returns an ICustomeAttributeProvider - ' that can be used to enumerate the custom attributes of the - ' return value. At present, there is no way to set such custom - ' attributes, so the list is empty. - If hello.ReturnType Is GetType(System.Void) Then - Console.WriteLine("The method has no return type.") - Else - Dim caProvider As ICustomAttributeProvider = _ - hello.ReturnTypeCustomAttributes - Dim returnAttributes() As Object = _ - caProvider.GetCustomAttributes(True) - If returnAttributes.Length = 0 Then - Console.WriteLine(vbCrLf _ - & "The return type has no custom attributes.") - Else - Console.WriteLine(vbCrLf _ - & "The return type has the following custom attributes:") - For Each attr As Object In returnAttributes - Console.WriteLine(vbTab & attr.ToString()) - Next attr - End If - End If - ' - - ' - Console.WriteLine(vbCrLf & "ToString: " & hello.ToString()) - ' - - ' - ' Display parameter information. - Dim parameters() As ParameterInfo = hello.GetParameters() - Console.WriteLine(vbCrLf & "Parameters: name, type, ParameterAttributes") - For Each p As ParameterInfo In parameters - Console.WriteLine(vbTab & "{0}, {1}, {2}", _ - p.Name, p.ParameterType, p.Attributes) - Next p - ' - End Sub -End Class - -' This code example produces the following output: -' -'Use the delegate to execute the dynamic method: -' -'Hello, World! -'Invoking delegate hi("Hello, World!", 42) returned: 42. -' -'Hi, Mom! -'Invoking delegate hi("Hi, Mom!", 5280) returned: 5280. -' -'Use the Invoke method to execute the dynamic method: -' -'Hello, World! -'hello.Invoke returned: 42 -' -' ----- Display information about the dynamic method ----- -' -'Method Attributes: PrivateScope, Public, Static -' -'Calling convention: Standard -' -'DeclaringType is always Nothing for dynamic methods. -' -'This method contains verifiable code. (InitLocals = True) -' -'Module: CommonLanguageRuntimeLibrary -' -'Name: Hello -' -'ReflectedType is Nothing. -' -'Method has no return parameter. -' -'Return type: System.Int32 -' -'The return type has no custom attributes. -' -'ToString: Int32 Hello(System.String, Int32) -' -'Parameters: name, type, ParameterAttributes -' message, System.String, In -' valueToReturn, System.Int32, In -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/CreateAndRunAssembly.cs b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/CreateAndRunAssembly.cs deleted file mode 100644 index 29f6e80cad3e1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/CreateAndRunAssembly.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.Loader; -using System.Runtime.InteropServices; - -public class CreatePersistedAssemblyExample -{ - public static void Main() - { - CreateSaveAndRunAssembly(); - CreatePersistedAssemblyBuilderCoreAssemblyWithMetadataLoadContext(RuntimeEnvironment.GetRuntimeDirectory()); - } - // - public static void CreateSaveAndRunAssembly() - { - PersistedAssemblyBuilder ab = new(new AssemblyName("MyAssembly"), typeof(object).Assembly); - ModuleBuilder mob = ab.DefineDynamicModule("MyModule"); - TypeBuilder tb = mob.DefineType( - "MyType", - TypeAttributes.Public | TypeAttributes.Class); - MethodBuilder meb = tb.DefineMethod( - "SumMethod", - MethodAttributes.Public | MethodAttributes.Static, - typeof(int), [typeof(int), typeof(int)]); - ILGenerator il = meb.GetILGenerator(); - il.Emit(OpCodes.Ldarg_0); - il.Emit(OpCodes.Ldarg_1); - il.Emit(OpCodes.Add); - il.Emit(OpCodes.Ret); - - tb.CreateType(); - - using var stream = new MemoryStream(); - ab.Save(stream); // Or pass filename to save into a file. - stream.Seek(0, SeekOrigin.Begin); - Assembly assembly = AssemblyLoadContext.Default.LoadFromStream(stream); - MethodInfo method = assembly.GetType("MyType").GetMethod("SumMethod"); - Console.WriteLine(method.Invoke(null, [5, 10])); - } - // - - // - public static void CreatePersistedAssemblyBuilderCoreAssemblyWithMetadataLoadContext(string refAssembliesPath) - { - PathAssemblyResolver resolver = new(Directory.GetFiles(refAssembliesPath, "*.dll")); - using MetadataLoadContext context = new(resolver); - Assembly coreAssembly = context.CoreAssembly; - PersistedAssemblyBuilder ab = new(new AssemblyName("MyDynamicAssembly"), coreAssembly); - TypeBuilder typeBuilder = ab.DefineDynamicModule("MyModule").DefineType("Test", TypeAttributes.Public); - MethodBuilder methodBuilder = typeBuilder.DefineMethod("Method", MethodAttributes.Public, coreAssembly.GetType(typeof(int).FullName), Type.EmptyTypes); - // .. add members and save the assembly - } - // -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/GenerateMetadataSnippets.cs b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/GenerateMetadataSnippets.cs deleted file mode 100644 index 1b21cd5427287..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/GenerateMetadataSnippets.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Collections; -using System.Globalization; -using System.IO; -using System.Reflection; -using System.Reflection.Emit; -using System.Reflection.Metadata.Ecma335; -using System.Reflection.Metadata; -using System.Reflection.PortableExecutable; -using System.Resources; - -public class SnippetExamples -{ - public static void Main() - { - SetEntryPoint(); - SetResource(); - ReadResource(); - } - // - public static void SetEntryPoint() - { - PersistedAssemblyBuilder ab = new(new AssemblyName("MyAssembly"), typeof(object).Assembly); - TypeBuilder tb = ab.DefineDynamicModule("MyModule").DefineType("MyType", TypeAttributes.Public | TypeAttributes.Class); - // ... - MethodBuilder entryPoint = tb.DefineMethod("Main", MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.Static); - ILGenerator il2 = entryPoint.GetILGenerator(); - // ... - il2.Emit(OpCodes.Ret); - tb.CreateType(); - - MetadataBuilder metadataBuilder = ab.GenerateMetadata(out BlobBuilder ilStream, out BlobBuilder fieldData); - - ManagedPEBuilder peBuilder = new( - header: PEHeaderBuilder.CreateExecutableHeader(), - metadataRootBuilder: new MetadataRootBuilder(metadataBuilder), - ilStream: ilStream, - mappedFieldData: fieldData, - entryPoint: MetadataTokens.MethodDefinitionHandle(entryPoint.MetadataToken)); - - BlobBuilder peBlob = new(); - peBuilder.Serialize(peBlob); - - // Create the executable: - using FileStream fileStream = new("MyAssembly.exe", FileMode.Create, FileAccess.Write); - peBlob.WriteContentTo(fileStream); - } - // - // - public static void SetResource() - { - PersistedAssemblyBuilder ab = new(new AssemblyName("MyAssembly"), typeof(object).Assembly); - ab.DefineDynamicModule("MyModule"); - MetadataBuilder metadata = ab.GenerateMetadata(out BlobBuilder ilStream, out _); - - using MemoryStream stream = new(); - ResourceWriter myResourceWriter = new(stream); - myResourceWriter.AddResource("AddResource 1", "First added resource"); - myResourceWriter.AddResource("AddResource 2", "Second added resource"); - myResourceWriter.AddResource("AddResource 3", "Third added resource"); - myResourceWriter.Close(); - - byte[] data = stream.ToArray(); - BlobBuilder resourceBlob = new(); - resourceBlob.WriteInt32(data.Length); - resourceBlob.WriteBytes(data); - - metadata.AddManifestResource( - ManifestResourceAttributes.Public, - metadata.GetOrAddString("MyResource.resources"), - implementation: default, - offset: 0); - - ManagedPEBuilder peBuilder = new( - header: PEHeaderBuilder.CreateLibraryHeader(), - metadataRootBuilder: new MetadataRootBuilder(metadata), - ilStream: ilStream, - managedResources: resourceBlob); - - BlobBuilder blob = new(); - peBuilder.Serialize(blob); - - // Create the assembly: - using FileStream fileStream = new("MyAssemblyWithResource.dll", FileMode.Create, FileAccess.Write); - blob.WriteContentTo(fileStream); - } - // - // - public static void ReadResource() - { - Assembly readAssembly = Assembly.LoadFile(Path.Combine( - Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), - "MyAssemblyWithResource.dll")); - - // Use ResourceManager.GetString() to read the resources. - ResourceManager rm = new("MyResource", readAssembly); - Console.WriteLine("Using ResourceManager.GetString():"); - Console.WriteLine($"{rm.GetString("AddResource 1", CultureInfo.InvariantCulture)}"); - Console.WriteLine($"{rm.GetString("AddResource 2", CultureInfo.InvariantCulture)}"); - Console.WriteLine($"{rm.GetString("AddResource 3", CultureInfo.InvariantCulture)}"); - - // Use ResourceSet to enumerate the resources. - Console.WriteLine(); - Console.WriteLine("Using ResourceSet:"); - ResourceSet resourceSet = rm.GetResourceSet(CultureInfo.InvariantCulture, createIfNotExists: true, tryParents: false); - foreach (DictionaryEntry entry in resourceSet) - { - Console.WriteLine($"Key: {entry.Key}, Value: {entry.Value}"); - } - - // Use ResourceReader to enumerate the resources. - Console.WriteLine(); - Console.WriteLine("Using ResourceReader:"); - using Stream stream = readAssembly.GetManifestResourceStream("MyResource.resources")!; - using ResourceReader reader = new(stream); - foreach (DictionaryEntry entry in reader) - { - Console.WriteLine($"Key: {entry.Key}, Value: {entry.Value}"); - } - } - // -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/Project.csproj deleted file mode 100644 index 68f3d17454a03..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Reflection.Emit/PersistedAssemblyBuilder/Overview/csharp/Project.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - Library - net10.0 - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/example.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/example.vb deleted file mode 100644 index 0b00c9d5ea000..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/CurrentCulture/Overview/vb/example.vb +++ /dev/null @@ -1,34 +0,0 @@ -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - -Module Example - Sub Main() - ' Create array of supported cultures - Dim cultures() As String = {"en-CA", "en-US", "fr-FR", "ru-RU" } - Dim rnd As New Random() - Dim cultureNdx As Integer = rnd.Next(0, cultures.Length) - Dim originalCulture As CultureInfo = Thread.CurrentThread.CurrentCulture - Dim rm As New ResourceManager("Greetings", GetType(Example).Assembly) - Try - Dim newCulture As New CultureInfo(cultures(cultureNdx)) - Thread.CurrentThread.CurrentCulture = newCulture - Thread.CurrentThread.CurrentUICulture = newCulture - Dim greeting As String = String.Format("The current culture is {0}.{1}{2}", - Thread.CurrentThread.CurrentUICulture.Name, - vbCrLf, rm.GetString("HelloString")) - - Console.WriteLine(greeting) - Catch e As CultureNotFoundException - Console.WriteLine("Unable to instantiate culture {0}", e.InvalidCultureName) - Finally - Thread.CurrentThread.CurrentCulture = originalCulture - Thread.CurrentThread.CurrentUICulture = originalCulture - End Try - End Sub -End Module -' The example displays output like the following: -' The current culture is ru-RU. -' Всем привет! -' \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/resourcenames.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/resourcenames.cs deleted file mode 100644 index 80c7559eb7037..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/resourcenames.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -using System; -using System.IO; -using System.Reflection; - -public class Example0 -{ - public static void Main() - { - if (Environment.GetCommandLineArgs().Length == 1) { - Console.WriteLine("No filename."); - return; - } - - string filename = Environment.GetCommandLineArgs()[1].Trim(); - // Check whether the file exists. - if (! File.Exists(filename)) { - Console.WriteLine($"{filename} does not exist."); - return; - } - - // Try to load the assembly. - Assembly assem = Assembly.LoadFrom(filename); - Console.WriteLine($"File: {filename}"); - - // Enumerate the resource files. - string[] resNames = assem.GetManifestResourceNames(); - if (resNames.Length == 0) - Console.WriteLine(" No resources found."); - - foreach (var resName in resNames) - Console.WriteLine($" Resource: {resName.Replace(".resources", "")}"); - - Console.WriteLine(); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate.cs deleted file mode 100644 index bfbe44b414cce..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; -using System.Threading; - -[assembly: NeutralResourcesLanguage("en")] - -public class ShowDateEx -{ - public static void Main() - { - string[] cultureNames = { "en-US", "fr-FR", "ru-RU", "sv-SE" }; - ResourceManager rm = new ResourceManager("DateStrings", - typeof(Example).Assembly); - - foreach (var cultureName in cultureNames) - { - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - Thread.CurrentThread.CurrentCulture = culture; - Thread.CurrentThread.CurrentUICulture = culture; - - Console.WriteLine($"Current UI Culture: {CultureInfo.CurrentUICulture.Name}"); - string dateString = rm.GetString("DateStart"); - Console.WriteLine($"{dateString} {DateTime.Now:M}.\n"); - } - } -} -// The example displays output similar to the following: -// Current UI Culture: en-US -// Today is February 03. -// -// Current UI Culture: fr-FR -// Aujourd'hui, c'est le 3 février -// -// Current UI Culture: ru-RU -// Сегодня февраля 03. -// -// Current UI Culture: sv-SE -// Today is den 3 februari. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate1.cs deleted file mode 100644 index 22634f380d154..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate1.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; -using System.Threading; - -public class Example -{ - public static void Main() - { - string[] cultureNames = [ "en-US", "fr-FR", "ru-RU", "sv-SE" ]; - ResourceManager rm = new ResourceManager("DateStrings", - typeof(Example).Assembly); - - foreach (var cultureName in cultureNames) { - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - Thread.CurrentThread.CurrentCulture = culture; - Thread.CurrentThread.CurrentUICulture = culture; - - Console.WriteLine($"Current UI Culture: {CultureInfo.CurrentUICulture.Name}"); - string dateString = rm.GetString("DateStart"); - Console.WriteLine($"{dateString} {DateTime.Now:M}.\n"); - } - } -} -// The example displays output similar to the following: -// Current UI Culture: en-US -// Today is February 03. -// -// Current UI Culture: fr-FR -// Aujourd'hui, c'est le 3 février -// -// Current UI Culture: ru-RU -// Сегодня февраля 03. -// -// Current UI Culture: sv-SE -// Today is den 3 februari. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate2.cs deleted file mode 100644 index 6457a59cd3fe3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showdate2.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; -using System.Threading; - -public class Example2 -{ - public static void Main() - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ru-RU"); - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("ru-RU"); - - string[] cultureNames = [ "fr-FR", "sv-SE" ]; - ResourceManager rm = new ResourceManager("DateStrings", - typeof(Example).Assembly); - - foreach (var cultureName in cultureNames) - { - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - string dateString = rm.GetString("DateStart", culture); - Console.WriteLine($"{culture.DisplayName}: {dateString} {DateTime.Now.ToString("M", culture)}."); - Console.WriteLine(); - } - } -} -// The example displays output similar to the following: -// French (France): Aujourd'hui, c'est le 7 février. -// -// Swedish (Sweden): Today is den 7 februari. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showtime.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showtime.cs deleted file mode 100644 index 37990991b22d1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/csharp/showtime.cs +++ /dev/null @@ -1,17 +0,0 @@ -// -using System; -using System.Resources; - -public class ShowTimeEx -{ - public static void Main() - { - ResourceManager rm = new ResourceManager("Strings", - typeof(Example).Assembly); - string timeString = rm.GetString("TimeHeader"); - Console.WriteLine($"{timeString} {DateTime.Now:T}"); - } -} -// The example displays output like the following: -// The current time is 2:03:14 PM -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/resourcenames.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/resourcenames.vb deleted file mode 100644 index d52cac32cd3ec..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/MissingManifestResourceException/Overview/vb/resourcenames.vb +++ /dev/null @@ -1,37 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.IO -Imports System.Reflection -Imports System.Resources - -Module Example - Public Sub Main() - If Environment.GetCommandLineArgs.Length = 1 Then - Console.WriteLine("No filename.") - Exit Sub - End If - Dim filename As String = Environment.GetCommandLineArgs(1).Trim() - ' Check whether the file exists. - If Not File.Exists(filename) Then - Console.WriteLine("{0} does not exist.", filename) - Exit Sub - End If - - ' Try to load the assembly. - Dim assem As Assembly = Assembly.LoadFrom(filename) - Console.WriteLine("File: {0}", filename) - - ' Enumerate the resource files. - Dim resNames() As String = assem.GetManifestResourceNames() - If resNames.Length = 0 Then - Console.WriteLine(" No resources found.") - End If - For Each resName In resNames - Console.WriteLine(" Resource: {0}", resName.Replace(".resources", "")) - Next - Console.WriteLine() - End Sub -End Module -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/example.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/example.cs deleted file mode 100644 index ca95766e33169..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/csharp/example.cs +++ /dev/null @@ -1,30 +0,0 @@ -// -using System; -using System.Globalization; -using System.Reflection; -using System.Resources; -using System.Threading; - -[assembly: NeutralResourcesLanguageAttribute("en")] -public class Example -{ - public static void Main() - { - // Select the current culture randomly to test resource fallback. - string[] cultures = { "de-DE", "en-us", "fr-FR" }; - Random rnd = new Random(); - int index = rnd.Next(0, cultures.Length); - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(cultures[index]); - Console.WriteLine($"The current culture is {CultureInfo.CurrentUICulture.Name}"); - - // Retrieve the resource. - ResourceManager rm = new ResourceManager("ExampleResources", - typeof(Example).Assembly); - string greeting = rm.GetString("Greeting"); - - Console.Write("Enter your name: "); - string name = Console.ReadLine(); - Console.WriteLine($"{greeting} {name}!"); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/example.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/example.vb deleted file mode 100644 index 52a0222df66a0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/NeutralResourcesLanguageAttribute/Overview/vb/example.vb +++ /dev/null @@ -1,30 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - - - -Module Example - Public Sub Main() - ' Select the current culture randomly to test resource fallback. - Dim cultures() As String = { "de-DE", "en-us", "fr-FR" } - Dim rnd As New Random() - Dim index As Integer = rnd.Next(0, cultures.Length) - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(cultures(index)) - Console.WriteLine("The current culture is {0}", - CultureInfo.CurrentUICulture.Name) - - ' Retrieve the resource. - Dim rm As New ResourceManager("ExampleResources" , GetType(Example).Assembly) - Dim greeting As String = rm.GetString("Greeting") - - Console.Write("Enter your name: ") - Dim name As String = Console.ReadLine() - Console.WriteLine("{0} {1}", greeting, name) - End Sub -End Module -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/ctor1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/ctor1.cs deleted file mode 100644 index 3c829904f4a63..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/ctor1.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Resources; - -public class Example -{ - public static void Main() - { - // - ResourceManager rm = new ResourceManager(typeof(Resource1)); - // - } -} - -internal class Resource1 -{ } \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/example.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/example.cs deleted file mode 100644 index 628678dc8ecfd..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/example.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -using System; -using System.Reflection; -using System.Resources; - -public class Example1 -{ - public static void Main() - { - // Retrieve the resource. - ResourceManager rm = new ResourceManager("ExampleResources", - typeof(Example).Assembly); - string greeting = rm.GetString("Greeting"); - - Console.Write("Enter your name: "); - string name = Console.ReadLine(); - Console.WriteLine($"{greeting} {name}!"); - } -} -// The example produces output similar to the following: -// Enter your name: John -// Hello John! -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/greet.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/greet.cs deleted file mode 100644 index 089dd80f7a480..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/csharp/greet.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -using System; -using System.Resources; -using System.Globalization; -using System.Threading; - -[assembly: NeutralResourcesLanguage("en")] - -public class Example2 -{ - public static void Main() - { - string[] cultureNames = [ "en-US", "fr-FR", "ru-RU", "sv-SE" ]; - DateTime noon = new DateTime(DateTime.Now.Year, DateTime.Now.Month, - DateTime.Now.Day, 12, 0, 0); - DateTime evening = new DateTime(DateTime.Now.Year, DateTime.Now.Month, - DateTime.Now.Day, 18, 0, 0); - - ResourceManager rm = new ResourceManager(typeof(GreetingResources)); - - foreach (var cultureName in cultureNames) - { - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(cultureName); - Console.WriteLine($"The current UI culture is {CultureInfo.CurrentUICulture.Name}"); - if (DateTime.Now < noon) - Console.WriteLine($"{rm.GetString("Morning")}!"); - else if (DateTime.Now < evening) - Console.WriteLine($"{rm.GetString("Afternoon")}!"); - else - Console.WriteLine($"{rm.GetString("Evening")}!"); - Console.WriteLine(); - } - } - - internal class GreetingResources - { - } -} -// The example displays output like the following: -// The current UI culture is en-US -// Good afternoon! -// -// The current UI culture is fr-FR -// Bonjour! -// -// The current UI culture is ru-RU -// Добрый день! -// -// The current UI culture is sv-SE -// Good afternoon! -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/example.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/example.vb deleted file mode 100644 index ab61a6bf9952d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/example.vb +++ /dev/null @@ -1,24 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Reflection -Imports System.Resources - -Module Example1 - Public Sub Main() - ' Retrieve the resource. - Dim rm As New ResourceManager("ExampleResources", - GetType(Example).Assembly) - Dim greeting As String = rm.GetString("Greeting") - - Console.Write("Enter your name: ") - Dim name As String = Console.ReadLine() - Console.WriteLine("{0} {1}!", greeting, name) - End Sub -End Module -' The example produces output similar to the following: -' Enter your name: John -' Hello John! -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/greet.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/greet.vb deleted file mode 100644 index cca544a6a4e4e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/.ctor/vb/greet.vb +++ /dev/null @@ -1,51 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Resources -Imports System.Globalization -Imports System.Threading - - - -Module Example - Public Sub Main() - Dim cultureNames() As String = {"en-US", "fr-FR", "ru-RU", "sv-SE" } - Dim noon As New Date(Date.Now.Year, Date.Now.Month, - Date.Now.Day, 12,0,0) - Dim evening As New Date(Date.Now.Year, Date.Now.Month, - Date.Now.Day, 18, 0, 0) - - Dim rm As New ResourceManager(GetType(GreetingResources)) - - For Each cultureName In cultureNames - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(cultureName) - Console.WriteLine("The current UI culture is {0}", - CultureInfo.CurrentUICulture.Name) - If Date.Now < noon Then - Console.WriteLine("{0}!", rm.GetString("Morning")) - ElseIf Date.Now < evening Then - Console.WriteLine("{0}!", rm.GetString("Afternoon")) - Else - Console.WriteLine("{0}!", rm.GetString("Evening")) - End If - Console.WriteLine() - Next - End Sub -End Module - -Friend Class GreetingResources -End Class -' The example displays output like the following: -' The current UI culture is en-US -' Good afternoon! -' -' The current UI culture is fr-FR -' Bonjour! -' -' The current UI culture is ru-RU -' Добрый день! -' -' The current UI culture is sv-SE -' Good afternoon! -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/Project.csproj deleted file mode 100644 index 731773ec4d687..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/Project.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Library - net48 - 12 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/createresources.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/createresources.cs deleted file mode 100644 index 4863188be2e16..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/createresources.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -using System; -using System.Resources; - -public class CreateResource -{ - public static void Main() - { - Numbers en = new Numbers("one", "two", "three", "four", "five", - "six", "seven", "eight", "nine", "ten"); - CreateResourceFile(en, "en"); - Numbers fr = new Numbers("un", "deux", "trois", "quatre", "cinq", - "six", "sept", "huit", "neuf", "dix"); - CreateResourceFile(fr, "fr"); - Numbers pt = new Numbers("um", "dois", "três", "quatro", "cinco", - "seis", "sete", "oito", "nove", "dez"); - CreateResourceFile(pt, "pt"); - Numbers ru = new Numbers("один", "два", "три", "четыре", "пять", - "шесть", "семь", "восемь", "девять", "десять"); - CreateResourceFile(ru, "ru"); - } - - public static void CreateResourceFile(Numbers n, string lang) - { - string filename = @".\NumberResources" + - (lang != "en" ? "." + lang : "" ) + - ".resx"; - ResXResourceWriter rr = new ResXResourceWriter(filename); - rr.AddResource("Numbers", n); - rr.Generate(); - rr.Close(); - } -} -// - -[Serializable] public class Numbers -{ - public readonly string One; - public readonly string Two; - public readonly string Three; - public readonly string Four; - public readonly string Five; - public readonly string Six; - public readonly string Seven; - public readonly string Eight; - public readonly string Nine; - public readonly string Ten; - - public Numbers(string one, string two, string three, string four, - string five, string six, string seven, string eight, - string nine, string ten) - { - this.One = one; - this.Two = two; - this.Three = three; - this.Four = four; - this.Five = five; - this.Six = six; - this.Seven = seven; - this.Eight = eight; - this.Nine = nine; - this.Ten = ten; - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/numberinfo.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/numberinfo.cs deleted file mode 100644 index dc06110ebd9d3..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/numberinfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -using System; - -[Serializable] public class Numbers2 -{ - public readonly string One; - public readonly string Two; - public readonly string Three; - public readonly string Four; - public readonly string Five; - public readonly string Six; - public readonly string Seven; - public readonly string Eight; - public readonly string Nine; - public readonly string Ten; - - public Numbers2(string one, string two, string three, string four, - string five, string six, string seven, string eight, - string nine, string ten) - { - this.One = one; - this.Two = two; - this.Three = three; - this.Four = four; - this.Five = five; - this.Six = six; - this.Seven = seven; - this.Eight = eight; - this.Nine = nine; - this.Ten = ten; - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/shownumbers.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/shownumbers.cs deleted file mode 100644 index d5e9e63e0313d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/csharp/shownumbers.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; -using System.Threading; - -[assembly:NeutralResourcesLanguageAttribute("en-US")] - -public class Example -{ - static string[] cultureNames = [ "fr-FR", "pt-BR", "ru-RU" ]; - - public static void Main() - { - // Make any non-default culture the current culture. - Random rnd = new Random(); - CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureNames[rnd.Next(0, cultureNames.Length)]); - Thread.CurrentThread.CurrentUICulture = culture; - Console.WriteLine($"The current culture is {CultureInfo.CurrentUICulture.Name}\n"); - CultureInfo enCulture = CultureInfo.CreateSpecificCulture("en-US"); - - ResourceManager rm = new ResourceManager(typeof(NumberResources)); - Numbers numbers = (Numbers) rm.GetObject("Numbers"); - Numbers numbersEn = (Numbers) rm.GetObject("Numbers", enCulture); - Console.WriteLine($"{numbers.One} --> {numbersEn.One}"); - Console.WriteLine($"{numbers.Three} --> {numbersEn.Three}"); - Console.WriteLine($"{numbers.Five} --> {numbersEn.Five}"); - Console.WriteLine($"{numbers.Seven} --> {numbersEn.Seven}"); - Console.WriteLine($"{numbers.Nine} --> {numbersEn.Nine}\n"); - } -} - -internal class NumberResources -{ -} -// The example displays output like the following: -// The current culture is pt-BR -// -// um --> one -// três --> three -// cinco --> five -// sete --> seven -// nove --> nine -// - -[Serializable] public class Numbers3 -{ - public readonly string One; - public readonly string Two; - public readonly string Three; - public readonly string Four; - public readonly string Five; - public readonly string Six; - public readonly string Seven; - public readonly string Eight; - public readonly string Nine; - public readonly string Ten; - - public Numbers3(string one, string two, string three, string four, - string five, string six, string seven, string eight, - string nine, string ten) - { - this.One = one; - this.Two = two; - this.Three = three; - this.Four = four; - this.Five = five; - this.Six = six; - this.Seven = seven; - this.Eight = eight; - this.Nine = nine; - this.Ten = ten; - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/Project.vbproj deleted file mode 100644 index 82288af1c7acc..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/Project.vbproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net48 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/createresources.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/createresources.vb deleted file mode 100644 index 34da5fc0ed44e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/createresources.vb +++ /dev/null @@ -1,61 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Resources - -Module CreateResource - Public Sub Main() - Dim en As New Numbers("one", "two", "three", "four", "five", - "six", "seven", "eight", "nine", "ten") - CreateResourceFile(en, "en") - Dim fr As New Numbers("un", "deux", "trois", "quatre", "cinq", - "six", "sept", "huit", "neuf", "dix") - CreateResourceFile(fr, "fr") - Dim pt As New Numbers("um", "dois", "três", "quatro", "cinco", - "seis", "sete", "oito", "nove", "dez") - CreateResourceFile(pt, "pt") - Dim ru As New Numbers("один", "два", "три", "четыре", "пять", - "шесть", "семь", "восемь", "девять", "десять") - CreateResourceFile(ru, "ru") - End Sub - - Public Sub CreateResourceFile(n As Numbers, lang As String) - Dim filename As String = ".\NumberResources" + - If(lang <> "en", "." + lang, "") + - ".resx" - Dim rr As New ResXResourceWriter(filename) - rr.AddResource("Numbers", n) - rr.Generate() - rr.Close() - End Sub -End Module -' - - Public Class Numbers - Public Readonly One As String - Public ReadOnly Two As String - Public ReadOnly Three As String - Public ReadOnly Four As String - Public ReadOnly Five As String - Public ReadOnly Six As String - Public ReadOnly Seven As String - Public ReadOnly Eight As String - Public ReadOnly Nine As String - Public ReadOnly Ten As String - - Public Sub New(one As String, two As String, three As String, four As String, - five As String, six As String, seven As String, eight As String, - nine As String, ten As String) - Me.One = one - Me.Two = two - Me.Three = three - Me.Four = four - Me.Five = five - Me.Six = six - Me.Seven = seven - Me.Eight = eight - Me.Nine = nine - Me.Ten = ten - End Sub -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example.vb deleted file mode 100644 index bed4c85d6b256..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example.vb +++ /dev/null @@ -1,44 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' The following is CreateResources.* -' -Imports System.Resources - -Module CreateResource1 - Public Sub Main() - Dim table As New PersonTable("Name", "Employee Number", "Age", 30, 18, 5) - Dim rr As New ResXResourceWriter(".\UIResources.resx") - rr.AddResource("TableName", "Employees of Acme Corporation") - rr.AddResource("Employees", table) - rr.Generate() - rr.Close() - End Sub -End Module -' - - -' The following is UIElements.* -' - Public Structure PersonTable1 - Public ReadOnly nColumns As Integer - Public ReadOnly column1 As String - Public ReadOnly column2 As String - Public ReadOnly column3 As String - Public ReadOnly width1 As Integer - Public ReadOnly width2 As Integer - Public ReadOnly width3 As Integer - - Public Sub New(column1 As String, column2 As String, column3 As String, - width1 As Integer, width2 As Integer, width3 As Integer) - Me.column1 = column1 - Me.column2 = column2 - Me.column3 = column3 - Me.width1 = width1 - Me.width2 = width2 - Me.width3 = width3 - Me.nColumns = Me.GetType().GetFields().Count \ 2 - End Sub -End Structure -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example2.vb deleted file mode 100644 index e64ae2afeaf7b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/example2.vb +++ /dev/null @@ -1,55 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Resources - - - -Module Example - Public Sub Main() - Dim fmtString As String = String.Empty - Dim rm As New ResourceManager("UIResources", GetType(Example).Assembly) - Dim title As String = rm.GetString("TableName") - Dim tableInfo As PersonTable = DirectCast(rm.GetObject("Employees"), PersonTable) - - If Not String.IsNullOrEmpty(title) Then - fmtString = "{0," + ((Console.WindowWidth + title.Length) \ 2).ToString() + "}" - Console.WriteLine(fmtString, title) - Console.WriteLine() - End If - - For ctr As Integer = 1 To tableInfo.nColumns - Dim columnName As String = "column" + ctr.ToString() - Dim widthName As String = "width" + ctr.ToString() - Dim value As String = CStr(tableInfo.GetType().GetField(columnName).GetValue(tableInfo)) - Dim width As Integer = CInt(tableInfo.GetType().GetField(widthName).GetValue(tableInfo)) - fmtString = "{0,-" + width.ToString() + "}" - Console.Write(fmtString, value) - Next - Console.WriteLine() - End Sub -End Module -' - - Public Structure PersonTable - Public ReadOnly nColumns As Integer - Public Readonly column1 As String - Public ReadOnly column2 As String - Public ReadOnly column3 As String - Public ReadOnly width1 As Integer - Public ReadOnly width2 As Integer - Public ReadOnly width3 As Integer - - Public Sub New(column1 As String, column2 As String, column3 As String, - width1 As Integer, width2 As Integer, width3 As Integer) - Me.column1 = column1 - Me.column2 = column2 - Me.column3 = column3 - Me.width1 = width1 - Me.width2 = width2 - Me.width3 = width3 - Me.nColumns = Me.GetType().GetFields().Count \ 2 - End Sub -End Structure - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/numberinfo.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/numberinfo.vb deleted file mode 100644 index 2aee0872b92f0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/numberinfo.vb +++ /dev/null @@ -1,29 +0,0 @@ -' - Public Class Numbers2 - Public ReadOnly One As String - Public ReadOnly Two As String - Public ReadOnly Three As String - Public ReadOnly Four As String - Public ReadOnly Five As String - Public ReadOnly Six As String - Public ReadOnly Seven As String - Public ReadOnly Eight As String - Public ReadOnly Nine As String - Public ReadOnly Ten As String - - Public Sub New(one As String, two As String, three As String, four As String, - five As String, six As String, seven As String, eight As String, - nine As String, ten As String) - Me.One = one - Me.Two = two - Me.Three = three - Me.Four = four - Me.Five = five - Me.Six = six - Me.Seven = seven - Me.Eight = eight - Me.Nine = nine - Me.Ten = ten - End Sub -End Class -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/shownumbers.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/shownumbers.vb deleted file mode 100644 index 1fddd314f0caa..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetObject/vb/shownumbers.vb +++ /dev/null @@ -1,73 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - -Module Example2 - Dim cultureNames() As String = {"fr-FR", "pt-BR", "ru-RU"} - - Public Sub Main() - ' Make any non-default culture the current culture. - Dim rnd As New Random - Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture(cultureNames(rnd.Next(0, cultureNames.Length))) - Thread.CurrentThread.CurrentUICulture = culture - Console.WriteLine("The current culture is {0}", CultureInfo.CurrentUICulture.Name) - Console.WriteLine() - Dim enCulture As CultureInfo = CultureInfo.CreateSpecificCulture("en-US") - - Dim rm As New ResourceManager(GetType(NumberResources)) - Dim numbers As Numbers = CType(rm.GetObject("Numbers"), Numbers) - Dim numbersEn As Numbers = CType(rm.GetObject("Numbers", enCulture), Numbers) - Console.WriteLine("{0} --> {1}", numbers.One, numbersEn.One) - Console.WriteLine("{0} --> {1}", numbers.Three, numbersEn.Three) - Console.WriteLine("{0} --> {1}", numbers.Five, numbersEn.Five) - Console.WriteLine("{0} --> {1}", numbers.Seven, numbersEn.Seven) - Console.WriteLine("{0} --> {1}", numbers.Nine, numbersEn.Nine) - Console.WriteLine() - End Sub -End Module - - -Friend Class NumberResources -End Class - -' The example displays output like the following: -' The current culture is pt-BR -' -' um --> one -' três --> three -' cinco --> five -' sete --> seven -' nove --> nine -' - - Public Class Numbers3 - Public ReadOnly One As String - Public ReadOnly Two As String - Public ReadOnly Three As String - Public ReadOnly Four As String - Public ReadOnly Five As String - Public ReadOnly Six As String - Public ReadOnly Seven As String - Public ReadOnly Eight As String - Public ReadOnly Nine As String - Public ReadOnly Ten As String - - Public Sub New(one As String, two As String, three As String, four As String, - five As String, six As String, seven As String, eight As String, - nine As String, ten As String) - Me.One = one - Me.Two = two - Me.Three = three - Me.Four = four - Me.Five = five - Me.Six = six - Me.Seven = seven - Me.Eight = eight - Me.Nine = nine - Me.Ten = ten - End Sub -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate.vb deleted file mode 100644 index 5b75d8c8c3851..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - - - -Module Example - Public Sub Main() - Dim cultureNames() As String = { "en-US", "fr-FR", "ru-RU", "sv-SE" } - Dim rm As New ResourceManager("DateStrings", - GetType(Example).Assembly) - - For Each cultureName In cultureNames - Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture(cultureName) - Thread.CurrentThread.CurrentCulture = culture - Thread.CurrentThread.CurrentUICulture = culture - - Console.WriteLine("Current UI Culture: {0}", - CultureInfo.CurrentUICulture.Name) - Dim dateString As String = rm.GetString("DateStart") - Console.WriteLine("{0} {1:M}.", dateString, Date.Now) - Console.WriteLine() - Next - End Sub -End Module -' The example displays output similar to the following: -' Current UI Culture: en-US -' Today is February 03. -' -' Current UI Culture: fr-FR -' Aujourd'hui, c'est le 3 février -' -' Current UI Culture: ru-RU -' Сегодня февраля 03. -' -' Current UI Culture: sv-SE -' Today is den 3 februari. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate2.vb deleted file mode 100644 index 7791d07210de5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/GetString/vb/showdate2.vb +++ /dev/null @@ -1,31 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - -Module Example2 - Public Sub Main() - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ru-RU") - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("ru-RU") - - Dim cultureNames() As String = {"fr-FR", "sv-SE"} - Dim rm As New ResourceManager("DateStrings", - GetType(Example).Assembly) - - For Each cultureName In cultureNames - Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture(cultureName) - Dim dateString As String = rm.GetString("DateStart", culture) - Console.WriteLine("{0}: {1} {2}.", culture.DisplayName, dateString, - Date.Now.ToString("M", culture)) - Console.WriteLine() - Next - End Sub -End Module -' The example displays output similar to the following: -' French (France): Aujourd'hui, c'est le 7 février. -' -' Swedish (Sweden): Today is den 7 februari. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/Project.csproj deleted file mode 100644 index 82288af1c7acc..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/Project.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net48 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/ctor1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/ctor1.cs deleted file mode 100644 index 4dc7b7e377a29..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/ctor1.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Resources; - -public class Example1 -{ - public static void Main() - { - CallCtor1(); - CallCtor2(); - } - - static void CallCtor1() - { - // - ResourceManager rm = new ResourceManager("MyCompany.StringResources", - typeof(Example).Assembly); - // - } - - static void CallCtor2() - { - // - ResourceManager rm = new ResourceManager(typeof(MyCompany.StringResources)); - // - } -} - -namespace MyCompany -{ - class StringResources { } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example.cs deleted file mode 100644 index fd939278b0459..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; -using System.Threading; - -public class Example -{ - public static void Main() - { - // Create array of supported cultures - string[] cultures = { "en-CA", "en-US", "fr-FR", "ru-RU" }; - Random rnd = new Random(); - int cultureNdx = rnd.Next(0, cultures.Length); - CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; - ResourceManager rm = new ResourceManager("Greetings", typeof(Example).Assembly); - try - { - CultureInfo newCulture = new CultureInfo(cultures[cultureNdx]); - Thread.CurrentThread.CurrentCulture = newCulture; - Thread.CurrentThread.CurrentUICulture = newCulture; - string greeting = String.Format("The current culture is {0}.\n{1}", - Thread.CurrentThread.CurrentUICulture.Name, - rm.GetString("HelloString")); - Console.WriteLine(greeting); - } - catch (CultureNotFoundException e) - { - Console.WriteLine($"Unable to instantiate culture {e.InvalidCultureName}"); - } - finally - { - Thread.CurrentThread.CurrentCulture = originalCulture; - Thread.CurrentThread.CurrentUICulture = originalCulture; - } - } -} -// The example displays output like the following: -// The current culture is ru-RU. -// Всем привет! -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example1.cs deleted file mode 100644 index 1663582493bbf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example1.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -using System; - -[Serializable] public struct PersonTable -{ - public readonly int nColumns; - public readonly string column1; - public readonly string column2; - public readonly string column3; - public readonly int width1; - public readonly int width2; - public readonly int width3; - - public PersonTable(string column1, string column2, string column3, - int width1, int width2, int width3) - { - this.column1 = column1; - this.column2 = column2; - this.column3 = column3; - this.width1 = width1; - this.width2 = width2; - this.width3 = width3; - this.nColumns = typeof(PersonTable).GetFields().Length / 2; - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example11.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example11.cs deleted file mode 100644 index 742d0eec5726e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example11.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Resources; - -public class CreateResource -{ - public static void Main() - { - PersonTable table = new PersonTable("Name", "Employee Number", - "Age", 30, 18, 5); - ResXResourceWriter rr = new ResXResourceWriter(@".\UIResources.resx"); - rr.AddResource("TableName", "Employees of Acme Corporation"); - rr.AddResource("Employees", table); - rr.Generate(); - rr.Close(); - } -} -// - -[Serializable] public struct PersonTable2 -{ - public readonly int nColumns; - public readonly string column1; - public readonly string column2; - public readonly string column3; - public readonly int width1; - public readonly int width2; - public readonly int width3; - - public PersonTable2(string column1, string column2, string column3, - int width1, int width2, int width3) - { - this.column1 = column1; - this.column2 = column2; - this.column3 = column3; - this.width1 = width1; - this.width2 = width2; - this.width3 = width3; - this.nColumns = typeof(PersonTable).GetFields().Length / 2; - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example2.cs deleted file mode 100644 index 0552ab4aaff0c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/example2.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -using System; -using System.Resources; - -[assembly: NeutralResourcesLanguageAttribute("en")] - -public class Example3 -{ - public static void Main() - { - string fmtString = String.Empty; - ResourceManager rm = new ResourceManager("UIResources", typeof(Example).Assembly); - string title = rm.GetString("TableName"); - PersonTable tableInfo = (PersonTable) rm.GetObject("Employees"); - - if (! String.IsNullOrEmpty(title)) { - fmtString = "{0," + ((Console.WindowWidth + title.Length) / 2).ToString() + "}"; - Console.WriteLine(fmtString, title); - Console.WriteLine(); - } - - for (int ctr = 1; ctr <= tableInfo.nColumns; ctr++) { - string columnName = "column" + ctr.ToString(); - string widthName = "width" + ctr.ToString(); - string value = tableInfo.GetType().GetField(columnName).GetValue(tableInfo).ToString(); - int width = (int) tableInfo.GetType().GetField(widthName).GetValue(tableInfo); - fmtString = "{0,-" + width.ToString() + "}"; - Console.Write(fmtString, value); - } - Console.WriteLine(); - } -} -// - -[Serializable] public struct PersonTable3 -{ - public readonly int nColumns; - public readonly string column1; - public readonly string column2; - public readonly string column3; - public readonly int width1; - public readonly int width2; - public readonly int width3; - - public PersonTable3(string column1, string column2, string column3, - int width1, int width2, int width3) - { - this.column1 = column1; - this.column2 = column2; - this.column3 = column3; - this.width1 = width1; - this.width2 = width2; - this.width3 = width3; - this.nColumns = typeof(PersonTable).GetFields().Length / 2; - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/rmc.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/rmc.cs deleted file mode 100644 index 20cbf63f3215a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/csharp/rmc.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -using System; -using System.Globalization; -using System.Resources; - -class Example2 -{ - public static void Main() - { - string day; - string year; - string holiday; - string celebrate = "{0} will occur on {1} in {2}.\n"; - - // Create a resource manager. - ResourceManager rm = new ResourceManager("rmc", - typeof(Example).Assembly); - - Console.WriteLine("Obtain resources using the current UI culture."); - - // Get the resource strings for the day, year, and holiday - // using the current UI culture. - day = rm.GetString("day"); - year = rm.GetString("year"); - holiday = rm.GetString("holiday"); - Console.WriteLine(celebrate, holiday, day, year); - - // Obtain the es-MX culture. - CultureInfo ci = new CultureInfo("es-MX"); - - Console.WriteLine("Obtain resources using the es-MX culture."); - - // Get the resource strings for the day, year, and holiday - // using the specified culture. - day = rm.GetString("day", ci); - year = rm.GetString("year", ci); - holiday = rm.GetString("holiday", ci); - // --------------------------------------------------------------- - // Alternatively, comment the preceding 3 code statements and - // uncomment the following 4 code statements: - // ---------------------------------------------------------------- - // Set the current UI culture to "es-MX" (Spanish-Mexico). - // Thread.CurrentThread.CurrentUICulture = ci; - - // Get the resource strings for the day, year, and holiday - // using the current UI culture. Use those strings to - // display a message. - // day = rm.GetString("day"); - // year = rm.GetString("year"); - // holiday = rm.GetString("holiday"); - // --------------------------------------------------------------- - - // Regardless of the alternative that you choose, display a message - // using the retrieved resource strings. - Console.WriteLine(celebrate, holiday, day, year); - } -} -/* -This example displays the following output: - - Obtain resources using the current UI culture. - "5th of May" will occur on Friday in 2006. - - Obtain resources using the es-MX culture. - "Cinco de Mayo" will occur on Viernes in 2006. -*/ -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/ctor1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/ctor1.vb deleted file mode 100644 index 8bc71ab99cf6a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/ctor1.vb +++ /dev/null @@ -1,26 +0,0 @@ -Imports System.Resources - -Public Module Example2 - Public Sub Main() - CallCtor1() - CallCtor2() - End Sub - - Sub CallCtor1() - ' - Dim rm As New ResourceManager("MyCompany.StringResources", - GetType(Example2).Assembly) - ' - End Sub - - Sub CallCtor2() - ' - Dim rm As New ResourceManager(GetType(MyCompany.StringResources)) - ' - End Sub -End Module - -Namespace MyCompany - Class StringResources - End Class -End Namespace diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/resourcenames.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/resourcenames.vb deleted file mode 100644 index 2aa627abb2d3e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/resourcenames.vb +++ /dev/null @@ -1,37 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.IO -Imports System.Reflection -Imports System.Resources - -Module Example3 - Public Sub Main() - If Environment.GetCommandLineArgs.Length = 1 Then - Console.WriteLine("No filename.") - Exit Sub - End If - Dim filename As String = Environment.GetCommandLineArgs(1).Trim() - ' Check whether the file exists. - If Not File.Exists(filename) Then - Console.WriteLine("{0} does not exist.", filename) - Exit Sub - End If - - ' Try to load the assembly. - Dim assem As Assembly = Assembly.LoadFrom(filename) - Console.WriteLine("File: {0}", filename) - - ' Enumerate the resource files. - Dim resNames() As String = assem.GetManifestResourceNames() - If resNames.Length = 0 Then - Console.WriteLine(" No resources found.") - End If - For Each resName In resNames - Console.WriteLine(" Resource: {0}", resName.Replace(".resources", "")) - Next - Console.WriteLine() - End Sub -End Module -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/rmc.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/rmc.vb deleted file mode 100644 index 5de1d0c30f0e6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/rmc.vb +++ /dev/null @@ -1,61 +0,0 @@ -' -Imports System.Resources -Imports System.Reflection -Imports System.Threading -Imports System.Globalization - -Class Example4 - Public Shared Sub Main() - Dim day As String - Dim year As String - Dim holiday As String - Dim celebrate As String = "{0} will occur on {1} in {2}." & vbCrLf - - ' Create a resource manager. - Dim rm As New ResourceManager("rmc", GetType(Example4).Assembly) - - Console.WriteLine("Obtain resources using the current UI culture.") - - ' Get the resource strings for the day, year, and holiday - ' using the current UI culture. - day = rm.GetString("day") - year = rm.GetString("year") - holiday = rm.GetString("holiday") - Console.WriteLine(celebrate, holiday, day, year) - - ' Obtain the es-MX culture. - Dim ci As New CultureInfo("es-MX") - - Console.WriteLine("Obtain resources using the es-MX culture.") - - ' Get the resource strings for the day, year, and holiday - ' using the es-MX culture. - day = rm.GetString("day", ci) - year = rm.GetString("year", ci) - holiday = rm.GetString("holiday", ci) - - ' --------------------------------------------------------------- - ' Alternatively, comment the preceding 3 code statements and - ' uncomment the following 4 code statements: - ' ---------------------------------------------------------------- - ' Set the current UI culture to "es-MX" (Spanish-Mexico). - ' Thread.CurrentThread.CurrentUICulture = ci - ' Get the resource strings for the day, year, and holiday - ' using the current UI culture. - ' day = rm.GetString("day") - ' year = rm.GetString("year") - ' holiday = rm.GetString("holiday") - ' --------------------------------------------------------------- - - ' Regardless of the alternative that you choose, display a message - ' using the retrieved resource strings. - Console.WriteLine(celebrate, holiday, day, year) - End Sub -End Class -' This example displays the following output: -'Obtain resources using the current UI culture. -'"5th of May" will occur on Friday in 2006. -' -'Obtain resources using the es-MX culture. -'"Cinco de Mayo" will occur on Viernes in 2006. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showdate.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showdate.vb deleted file mode 100644 index 18ef5f69f97a2..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showdate.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Resources -Imports System.Threading - - - -Module Example5 - Public Sub Main() - Dim cultureNames() As String = {"en-US", "fr-FR", "ru-RU", "sv-SE"} - Dim rm As New ResourceManager("DateStrings", - GetType(Example5).Assembly) - - For Each cultureName In cultureNames - Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture(cultureName) - Thread.CurrentThread.CurrentCulture = culture - Thread.CurrentThread.CurrentUICulture = culture - - Console.WriteLine("Current UI Culture: {0}", - CultureInfo.CurrentUICulture.Name) - Dim dateString As String = rm.GetString("DateStart") - Console.WriteLine("{0} {1:M}.", dateString, Date.Now) - Console.WriteLine() - Next - End Sub -End Module -' The example displays output similar to the following: -' Current UI Culture: en-US -' Today is February 03. -' -' Current UI Culture: fr-FR -' Aujourd'hui, c'est le 3 février -' -' Current UI Culture: ru-RU -' Сегодня февраля 03. -' -' Current UI Culture: sv-SE -' Today is den 3 februari. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showtime.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showtime.vb deleted file mode 100644 index 880654e69b589..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceManager/Overview/vb/showtime.vb +++ /dev/null @@ -1,16 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Resources - -Module Example6 - Public Sub Main() - Dim rm As New ResourceManager("Strings", GetType(Example6).Assembly) - Dim timeString As String = rm.GetString("TimeHeader") - Console.WriteLine("{0} {1:T}", timeString, Date.Now) - End Sub -End Module -' The example displays output similar to the following: -' The current time is 2:03:14 PM -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/Project.csproj deleted file mode 100644 index c3fdf8b0f2976..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/Project.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Library - net10.0 - - - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/class1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/class1.cs deleted file mode 100644 index 274482d5d5413..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/class1.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -using System; -using System.Collections; -using System.Resources; - -public class Example1 -{ - public static void Run() - { - Console.WriteLine("Resources in ApplicationResources.resources:"); - ResourceReader res = new ResourceReader(@".\ApplicationResources.resources"); - IDictionaryEnumerator dict = res.GetEnumerator(); - while (dict.MoveNext()) - Console.WriteLine($" {dict.Key}: '{dict.Value}' (Type {dict.Value.GetType().Name})"); - res.Close(); - } -} -// The example displays the following output: -// Resources in ApplicationResources.resources: -// Label3: '"Last Name:"' (Type String) -// Label2: '"Middle Name:"' (Type String) -// Label1: '"First Name:"' (Type String) -// Label7: '"State:"' (Type String) -// Label6: '"City:"' (Type String) -// Label5: '"Street Address:"' (Type String) -// Label4: '"SSN:"' (Type String) -// Label9: '"Home Phone:"' (Type String) -// Label8: '"Zip Code:"' (Type String) -// Title: '"Contact Information"' (Type String) -// Label12: '"Other Phone:"' (Type String) -// Label13: '"Fax:"' (Type String) -// Label10: '"Business Phone:"' (Type String) -// Label11: '"Mobile Phone:"' (Type String) -// Label14: '"Email Address:"' (Type String) -// Label15: '"Alternate Email Address:"' (Type String) -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/createresourceex1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/createresourceex1.cs deleted file mode 100644 index 753b456524914..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/createresourceex1.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using System.Resources; -using System.Runtime.Versioning; - -public class Example5 -{ - [SupportedOSPlatform("windows")] - public static void Run() - { - // Bitmap as stream. - MemoryStream bitmapStream = new MemoryStream(); - Bitmap bmp = new Bitmap(@".\ContactsIcon.jpg"); - bmp.Save(bitmapStream, ImageFormat.Jpeg); - - // Define resources to be written. - using (ResourceWriter rw = new ResourceWriter(@".\ContactResources.resources")) - { - rw.AddResource("Title", "Contact List"); - rw.AddResource("NColumns", 5); - rw.AddResource("Icon", bitmapStream); - rw.AddResource("Header1", "Name"); - rw.AddResource("Header2", "City"); - rw.AddResource("Header3", "State"); - rw.AddResource("ClientVersion", true); - rw.Generate(); - } - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/ctor1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/ctor1.cs deleted file mode 100644 index 806ef3c1a2403..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/ctor1.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -public class Example -{ - public static void Run() - { - Example ex = new Example(); - ex.Standalone(); - Console.WriteLine("---"); - ex.Embedded(); - } - - private void Standalone() - { - // - // Instantiate a standalone .resources file from its filename. - var rr1 = new System.Resources.ResourceReader("Resources1.resources"); - - // Instantiate a standalone .resources file from a stream. - var fs = new System.IO.FileStream(@".\Resources2.resources", - System.IO.FileMode.Open); - var rr2 = new System.Resources.ResourceReader(fs); - // - - Console.WriteLine($"rr1: {rr1 != null}"); - Console.WriteLine($"rr2: {rr2 != null}"); - } - - private void Embedded() - { - // - System.Reflection.Assembly assem = - System.Reflection.Assembly.LoadFrom(@".\MyLibrary.dll"); - System.IO.Stream fs = - assem.GetManifestResourceStream("MyCompany.LibraryResources.resources"); - var rr = new System.Resources.ResourceReader(fs); - // - - if (fs == null) - { - Console.WriteLine(fs == null); - foreach (var name in assem.GetManifestResourceNames()) - Console.WriteLine(name); - - return; - } - else - { - Console.WriteLine(fs == null); - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/readresourceex1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/readresourceex1.cs deleted file mode 100644 index a0b8109ec1e37..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/csharp/readresourceex1.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -using System; -using System.Collections; -using System.Drawing; -using System.IO; -using System.Resources; -using System.Runtime.Versioning; - -public class Example6 -{ - [SupportedOSPlatform("windows")] - public static void Run() - { - ResourceReader rdr = new ResourceReader(@".\ContactResources.resources"); - IDictionaryEnumerator dict = rdr.GetEnumerator(); - while (dict.MoveNext()) - { - Console.WriteLine($"Resource Name: {dict.Key}"); - try - { - Console.WriteLine($" Value: {dict.Value}"); - } - catch (FileNotFoundException) - { - Console.WriteLine(" Exception: A file cannot be found."); - DisplayResourceInfo(rdr, (string)dict.Key, false); - } - catch (FormatException) - { - Console.WriteLine(" Exception: Corrupted data."); - DisplayResourceInfo(rdr, (string)dict.Key, true); - } - catch (TypeLoadException) - { - Console.WriteLine(" Exception: Cannot load the data type."); - DisplayResourceInfo(rdr, (string)dict.Key, false); - } - } - } - - [SupportedOSPlatform("windows")] - private static void DisplayResourceInfo(ResourceReader rr, - string key, bool loaded) - { - string dataType = null; - byte[] data = null; - rr.GetResourceData(key, out dataType, out data); - - // Display the data type. - Console.WriteLine($" Data Type: {dataType}"); - // Display the bytes that form the available data. - Console.Write(" Data: "); - int lines = 0; - foreach (var dataItem in data) - { - lines++; - Console.Write("{0:X2} ", dataItem); - if (lines % 25 == 0) - Console.Write("\n "); - } - Console.WriteLine(); - // Try to recreate current state of data. - // Do: Bitmap, DateTimeTZI - switch (dataType) - { - // Handle internally serialized string data (ResourceTypeCode members). - case "ResourceTypeCode.String": - BinaryReader reader = new BinaryReader(new MemoryStream(data)); - string binData = reader.ReadString(); - Console.WriteLine($" Recreated Value: {binData}"); - break; - case "ResourceTypeCode.Int32": - Console.WriteLine($" Recreated Value: {BitConverter.ToInt32(data, 0)}"); - break; - case "ResourceTypeCode.Boolean": - Console.WriteLine($" Recreated Value: {BitConverter.ToBoolean(data, 0)}"); - break; - // .jpeg image stored as a stream. - case "ResourceTypeCode.Stream": - const int OFFSET = 4; - int size = BitConverter.ToInt32(data, 0); - Bitmap value1 = new Bitmap(new MemoryStream(data, OFFSET, size)); - Console.WriteLine($" Recreated Value: {value1}"); - break; - default: - break; - } - Console.WriteLine(); - } -} -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/class1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/class1.vb deleted file mode 100644 index 32cc54a9eb381..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/class1.vb +++ /dev/null @@ -1,37 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Collections -Imports System.Resources - -Module Example2 - Public Sub Main() - Console.WriteLine("Resources in ApplicationResources.resources:") - Dim res As New ResourceReader(".\ApplicationResources.resources") - Dim dict As IDictionaryEnumerator = res.GetEnumerator() - Do While dict.MoveNext() - Console.WriteLine(" {0}: '{1}' (Type {2})", dict.Key, dict.Value, dict.Value.GetType().Name) - Loop - res.Close() - End Sub -End Module -' The example displays output like the following: -' Resources in ApplicationResources.resources: -' Label3: '"Last Name:"' (Type String) -' Label2: '"Middle Name:"' (Type String) -' Label1: '"First Name:"' (Type String) -' Label7: '"State:"' (Type String) -' Label6: '"City:"' (Type String) -' Label5: '"Street Address:"' (Type String) -' Label4: '"SSN:"' (Type String) -' Label9: '"Home Phone:"' (Type String) -' Label8: '"Zip Code:"' (Type String) -' Title: '"Contact Information"' (Type String) -' Label12: '"Other Phone:"' (Type String) -' Label13: '"Fax:"' (Type String) -' Label10: '"Business Phone:"' (Type String) -' Label11: '"Mobile Phone:"' (Type String) -' Label14: '"Email Address:"' (Type String) -' Label15: '"Alternate Email Address:"' (Type String) -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/ctor1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/ctor1.vb deleted file mode 100644 index 9d0a3ce02f03b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Resources/ResourceReader/Overview/vb/ctor1.vb +++ /dev/null @@ -1,46 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Module Example - Public Sub Main() - Standalone() - Console.WriteLine("---") - Embedded - End Sub - - Private Sub Standalone() - ' - ' Instantiate a standalone .resources file from its filename. - Dim rr1 As New System.Resources.ResourceReader("Resources1.resources") - - ' Instantiate a standalone .resources file from a stream. - Dim fs As New System.IO.FileStream(".\Resources2.resources", - System.IO.FileMode.Open) - Dim rr2 As New System.Resources.ResourceReader(fs) - ' - - Console.WriteLine("rr1: {0}", rr1 IsNot Nothing) - Console.WriteLine("rr2: {0}", rr2 IsNot Nothing) - End Sub - - Private Sub Embedded() - ' - Dim assem As System.Reflection.Assembly = - System.Reflection.Assembly.LoadFrom(".\MyLibrary.dll") - Dim fs As System.IO.Stream = - assem.GetManifestResourceStream("MyCompany.LibraryResources.resources") - Dim rr As New System.Resources.ResourceReader(fs) - ' - - If fs Is Nothing Then - Console.WriteLine(fs Is Nothing) - For Each name In assem.GetManifestResourceNames() - Console.WriteLine(name) - Next - Exit Sub - Else - Console.WriteLine(fs Is Nothing) - End If - End Sub -End Module - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple1.cs deleted file mode 100644 index 25b9cbfd39e30..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple1.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Runtime.CompilerServices; - -// -[assembly:InternalsVisibleTo("Friend1a")] -[assembly:InternalsVisibleTo("Friend1b")] -// - -public class StringUtilities -{ - internal string ToTitleCase(string value) - { - string retval = null; - for (int ctr = 0; ctr <= value.Length - 1; ctr++) - if (ctr == 0) - retval += Char.ToUpper(value[ctr]); - else if (ctr > 0 && Char.IsWhiteSpace(value[ctr - 1])) - retval += Char.ToUpper(value[ctr]); - else - retval += value[ctr]; - return retval; - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple2.cs deleted file mode 100644 index 981dd1b35e936..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/csharp/multiple2.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Runtime.CompilerServices; - -// -[assembly:InternalsVisibleTo("Friend2a"), - InternalsVisibleTo("Friend2b")] -// - -namespace Utilities -{ - public class StringUtilities - { - internal static string ToTitleCase(string value) - { - string retval = null; - for (int ctr = 0; ctr <= value.Length - 1; ctr++) - if (ctr == 0) - retval += Char.ToUpper(value[ctr]); - else if (ctr > 0 && Char.IsWhiteSpace(value[ctr - 1])) - retval += Char.ToUpper(value[ctr]); - else - retval += value[ctr]; - return retval; - } - } -} \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple1.vb deleted file mode 100644 index 24e7e90f23773..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple1.vb +++ /dev/null @@ -1,21 +0,0 @@ -Imports System.Runtime.CompilerServices - -' - - -' -Public Class StringUtilities - Friend Function ToTitleCase(value As String) As String - Dim retval As String = Nothing - For ctr As Integer = 0 To value.Length - 1 - If ctr = 0 Then - retval += Char.ToUpper(value(ctr)) - ElseIf ctr > 0 AndAlso Char.IsWhiteSpace(value(ctr - 1)) - retval += Char.ToUpper(value(ctr)) - Else - retval += value(ctr) - End If - Next - Return retval - End Function -End Class diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple2.vb deleted file mode 100644 index 54c1b82611a18..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/vb/multiple2.vb +++ /dev/null @@ -1,23 +0,0 @@ -Imports System.Runtime.CompilerServices - -' - -' -Namespace Utilities - Public Class StringUtilities - Shared Friend Function ToTitleCase(value As String) As String - Dim retval As String = Nothing - For ctr As Integer = 0 To value.Length - 1 - If ctr = 0 Then - retval += Char.ToUpper(value(ctr)) - ElseIf ctr > 0 AndAlso Char.IsWhiteSpace(value(ctr - 1)) - retval += Char.ToUpper(value(ctr)) - Else - retval += value(ctr) - End If - Next - Return retval - End Function - End Class -End Namespace \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/gethashcodeex1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/gethashcodeex1.cs deleted file mode 100644 index c58d72ac74c0d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/csharp/gethashcodeex1.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -using System; -using System.Runtime.CompilerServices; - -public class Example -{ - public static void Main() - { - Console.WriteLine("{0,-18} {1,6} {2,18:N0} {3,6} {4,18:N0}\n", - "", "Var 1", "Hash Code", "Var 2", "Hash Code"); - - // Get hash codes of two different strings. - String sc1 = "String #1"; - String sc2 = "String #2"; - ShowHashCodes("sc1", sc1, "sc2", sc2); - - // Get hash codes of two identical non-interned strings. - String s1 = "This string"; - String s2 = String.Format("{0} {1}", "This", "string"); - ShowHashCodes("s1", s1, "s2", s2); - - // Get hash codes of two (evidently concatenated) strings. - String si1 = "This is a string!"; - String si2 = "This " + "is " + "a " + "string!"; - ShowHashCodes("si1", si1, "si2", si2); - } - - private static void ShowHashCodes(String var1, Object value1, - String var2, Object value2) - { - Console.WriteLine("{0,-18} {1,6} {2,18:X8} {3,6} {4,18:X8}", - "Obj.GetHashCode", var1, value1.GetHashCode(), - var2, value2.GetHashCode()); - - Console.WriteLine("{0,-18} {1,6} {2,18:X8} {3,6} {4,18:X8}\n", - "RTH.GetHashCode", var1, RuntimeHelpers.GetHashCode(value1), - var2, RuntimeHelpers.GetHashCode(value2)); - } -} -// The example displays output similar to the following: -// Var 1 Hash Code Var 2 Hash Code -// -// Obj.GetHashCode sc1 94EABD27 sc2 94EABD24 -// RTH.GetHashCode sc1 02BF8098 sc2 00BB8560 -// -// Obj.GetHashCode s1 29C5A397 s2 29C5A397 -// RTH.GetHashCode s1 0297B065 s2 03553390 -// -// Obj.GetHashCode si1 941BCEA5 si2 941BCEA5 -// RTH.GetHashCode si1 01FED012 si2 01FED012 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/gethashcodeex1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/gethashcodeex1.vb deleted file mode 100644 index 23afc1bd6229e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/vb/gethashcodeex1.vb +++ /dev/null @@ -1,52 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Runtime.CompilerServices - -Module Example - Public Sub Main() - Console.WriteLine("{0,-18} {1,6} {2,18:N0} {3,6} {4,18:N0}", - "", "Var 1", "Hash Code", "Var 2", "Hash Code") - Console.WriteLine() - - ' Get hash codes of two different strings. - Dim sc1 As String = "String #1" - Dim sc2 As String = "String #2" - ShowHashCodes("sc1", sc1, "sc2", sc2) - - ' Get hash codes of two identical non-interned strings. - Dim s1 As String = "This string" - Dim s2 As String = String.Format("{0} {1}", "This", "string") - ShowHashCodes("s1", s1, "s2", s2) - - ' Get hash codes of two (evidently concatenated) strings. - Dim si1 As String = "This is a string!" - Dim si2 As String = "This " + "is " + "a " + "string!" - ShowHashCodes("si1", si1, "si2", si2) - End Sub - - Private Sub ShowHashCodes(var1 As String, value1 As Object, - var2 As String, value2 As Object) - Console.WriteLine("{0,-18} {1,6} {2,18:X8} {3,6} {4,18:X8}", - "Obj.GetHashCode", var1, value1.GetHashCode, - var2, value2.GetHashCode) - - Console.WriteLine("{0,-18} {1,6} {2,18:X8} {3,6} {4,18:X8}", - "RTH.GetHashCode", var1, RuntimeHelpers.GetHashCode(value1), - var2, RuntimeHelpers.GetHashCode(value2)) - Console.WriteLine() - End Sub -End Module -' The example displays output similar to the following: -' Var 1 Hash Code Var 2 Hash Code -' -' Obj.GetHashCode sc1 94EABD27 sc2 94EABD24 -' RTH.GetHashCode sc1 02BF8098 sc2 00BB8560 -' -' Obj.GetHashCode s1 29C5A397 s2 29C5A397 -' RTH.GetHashCode s1 0297B065 s2 03553390 -' -' Obj.GetHashCode si1 941BCEA5 si2 941BCEA5 -' RTH.GetHashCode si1 01FED012 si2 01FED012 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/source.cs b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/source.cs deleted file mode 100644 index a86d65aa13274..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/csharp/source.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -// -using System.Runtime.InteropServices; -// - -// -public interface INew -{ - void NewMethod(); -} -// - -// -public interface ICustomMarshaler -{ - Object MarshalNativeToManaged(IntPtr pNativeData); - IntPtr MarshalManagedToNative(Object ManagedObj); - void CleanUpNativeData(IntPtr pNativeData); - void CleanUpManagedData(Object ManagedObj); - int GetNativeDataSize(); -} -// - -namespace scope1 -{ - // - interface IUserData - { - void DoSomeStuff(INew pINew); - } - // -} - -namespace scope2 -{ - // - interface IUserData - { - void DoSomeStuff( - [MarshalAs(UnmanagedType.CustomMarshaler, - MarshalType="NewOldMarshaler")] - INew pINew - ); - } - // -} - -// -public class NewOldMarshaler : ICustomMarshaler -{ - public static ICustomMarshaler GetInstance(string pstrCookie) - => new NewOldMarshaler(); - - public Object MarshalNativeToManaged(IntPtr pNativeData) => throw new NotImplementedException(); - public IntPtr MarshalManagedToNative(Object ManagedObj) => throw new NotImplementedException(); - public void CleanUpNativeData(IntPtr pNativeData) => throw new NotImplementedException(); - public void CleanUpManagedData(Object ManagedObj) => throw new NotImplementedException(); - public int GetNativeDataSize() => throw new NotImplementedException(); -} -// - -class StubClass -{ - public static void Main() { } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/source.vb b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/source.vb deleted file mode 100644 index 0b0c06adb87b1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.InteropServices/ICustomMarshaler/Overview/vb/source.vb +++ /dev/null @@ -1,47 +0,0 @@ -' -Imports System.Runtime.InteropServices - -' - -' -Public Interface INew - Sub NewMethod() -End Interface -' - - -' -Public Interface ICustomMarshaler - Function MarshalNativeToManaged( pNativeData As IntPtr ) As Object - Function MarshalManagedToNative( ManagedObj As Object ) As IntPtr - Sub CleanUpNativeData( pNativeData As IntPtr ) - Sub CleanUpManagedData( ManagedObj As Object ) - Function GetNativeDataSize() As Integer -End Interface -' - -Namespace scope1 - -' -Public Interface IUserData - Sub DoSomeStuff(pINew As INew) -End Interface -' - -End Namespace - -Namespace scope2 - -' -Public Interface IUserData - Sub DoSomeStuff( _ - pINew As INew) -End Interface -' -End Namespace - -Class StubClass - Public Shared Sub Main - End Sub -End Class \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/apply1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/apply1.cs deleted file mode 100644 index 5cbe00d402f66..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/csharp/apply1.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.Versioning; - -[assembly:ComponentGuaranteesAttribute(ComponentGuaranteesOptions.None)] -namespace MyLibrary -{ - [ComponentGuaranteesAttribute(ComponentGuaranteesOptions.Stable)] public class MyLibraryClass - { - public string GetName() - { - return "My Library"; - } - } - - [ComponentGuaranteesAttribute(ComponentGuaranteesOptions.Exchange)] public class MyPrimitiveClass - {} - - [ComponentGuaranteesAttribute(ComponentGuaranteesOptions.None)] public class MyChurningClass - {} -} - -public class Example -{ - public static void Main() - { - Assembly assem = typeof(Example).Assembly; - foreach (Type typ in assem.GetTypes()) - { - object[] typeAttribs = typ.GetCustomAttributes(typeof(ComponentGuaranteesAttribute), true); - if (typeAttribs.Length > 0) - { - ComponentGuaranteesAttribute guaranteeAttrib = (ComponentGuaranteesAttribute) typeAttribs[0]; - ComponentGuaranteesOptions guarantee = guaranteeAttrib.Guarantees; - // Test whether guarantee is Exchange. - if ((guarantee & ComponentGuaranteesOptions.Exchange) == ComponentGuaranteesOptions.Exchange) - Console.WriteLine($"{typ.Name} is marked as {guarantee}."); - // - // Test whether guarantee is Stable. - if ((guarantee & ComponentGuaranteesOptions.Stable) == ComponentGuaranteesOptions.Stable) - Console.WriteLine($"{typ.Name} is marked as {guarantee}."); - // - // - // Test whether guarantee is Stable or Exchange. - if ((guarantee & (ComponentGuaranteesOptions.Stable | ComponentGuaranteesOptions.Exchange)) > 0) - Console.WriteLine($"{typ.Name} is marked as Stable or Exchange."); - // - // - // Test whether there is no guarantee (neither Stable nor Exchange). - if ((guarantee & (ComponentGuaranteesOptions.Stable | ComponentGuaranteesOptions.Exchange)) == 0) - Console.WriteLine($"{typ.Name} has no compatibility guarantee."); - // - } - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/apply1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/apply1.vb deleted file mode 100644 index bd3f3de6b1826..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/vb/apply1.vb +++ /dev/null @@ -1,57 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.Reflection -Imports System.Runtime.Versioning - - -Namespace MyLibrary - Public Class MyLibraryClass - Public Function GetName() As String - Return "My Library" - End Function - End Class - - Public Class MyPrimitiveClass - - End Class - - Public Class MyChurningClass - - End Class -End Namespace - -Public Module Example - Public Sub Main() - Dim assem As Assembly = GetType(Example).Assembly - For Each typ As Type In assem.GetTypes() - Dim typeAttribs() As Object = typ.GetCustomAttributes(GetType(ComponentGuaranteesAttribute), True) - If typeAttribs.Length > 0 Then - Dim guaranteeAttrib As ComponentGuaranteesAttribute = DirectCast(typeAttribs(0), ComponentGuaranteesAttribute) - Dim guarantee = guaranteeAttrib.Guarantees - ' Test whether guarantee is Exchange. - If (guarantee And ComponentGuaranteesOptions.Exchange) = ComponentGuaranteesOptions.Exchange Then - Console.WriteLine("{0} is marked as {1}.", typ.Name, guarantee) - End If - ' - ' Test whether guarantee is Stable. - If (guarantee And ComponentGuaranteesOptions.Stable) = ComponentGuaranteesOptions.Stable Then - Console.WriteLine("{0} is marked as {1}.", typ.Name, guarantee) - End If - ' - ' - ' Test whether guarantee is Stable or Exchange. - If (guarantee And (ComponentGuaranteesOptions.Stable Or ComponentGuaranteesOptions.Exchange)) > 0 Then - Console.WriteLine("{0} is marked as Stable or Exchange.", typ.Name, guarantee) - End If - ' - ' - ' Test whether there is no guarantee (neither Stable nor Exchange). - If (guarantee And (ComponentGuaranteesOptions.Stable Or ComponentGuaranteesOptions.Exchange)) = 0 Then - Console.WriteLine("{0} has no compatibility guarantee.", typ.Name, guarantee) - End If - ' - End If - Next - End Sub -End Module diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/startat.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/startat.cs deleted file mode 100644 index f4ed0b262fab1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/startat.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Text.RegularExpressions; - -namespace Examples -{ - public class Example3 - { - public static void Main() - { - string input = "Zip code: 98052"; - var regex = new Regex(@"(?<=Zip code: )\d{5}"); - Match match = regex.Match(input, 5); - if (match.Success) - Console.WriteLine($"Match found: {match.Value}"); - } - } -} - -// This code prints the following output: -// Match found: 98052 diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/caching1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/caching1.cs deleted file mode 100644 index f5389b0b8282d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/caching1.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.IO; -using System.Text.RegularExpressions; - -public class CachingExample -{ - public static void Main() - { - string filename = @".\Caching1.txt"; - // - StreamReader sr = new StreamReader(filename); - string input; - string pattern = @"\b(\w+)\s\1\b"; - while (sr.Peek() >= 0) - { - input = sr.ReadLine(); - Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase); - MatchCollection matches = rgx.Matches(input); - if (matches.Count > 0) - { - Console.WriteLine($"{input} ({matches.Count} matches):"); - foreach (Match match in matches) - Console.WriteLine(" " + match.Value); - } - } - sr.Close(); - // - Console.WriteLine(); - Main2(); - } - - public static void Main2() - { - string filename = @".\Caching1.txt"; - // - StreamReader sr = new StreamReader(filename); - string input; - string pattern = @"\b(\w+)\s\1\b"; - Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase); - - while (sr.Peek() >= 0) - { - input = sr.ReadLine(); - MatchCollection matches = rgx.Matches(input); - if (matches.Count > 0) - { - Console.WriteLine($"{input} ({matches.Count} matches):"); - foreach (Match match in matches) - Console.WriteLine(" " + match.Value); - } - } - sr.Close(); - // - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/regex_example1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/regex_example1.cs deleted file mode 100644 index f3b5a59cdb006..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/regex_example1.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -using System; -using System.Globalization; -using System.Text.RegularExpressions; - -public class Example -{ - public static void Main() - { - // Get the en-US NumberFormatInfo object to build the regular - // expression pattern dynamically. - NumberFormatInfo nfi = CultureInfo.GetCultureInfo("en-US").NumberFormat; - - // Define the regular expression pattern. - string pattern; - pattern = @"^\s*["; - // Get the positive and negative sign symbols. - pattern += Regex.Escape(nfi.PositiveSign + nfi.NegativeSign) + @"]?\s?"; - // Get the currency symbol. - pattern += Regex.Escape(nfi.CurrencySymbol) + @"?\s?"; - // Add integral digits to the pattern. - pattern += @"(\d*"; - // Add the decimal separator. - pattern += Regex.Escape(nfi.CurrencyDecimalSeparator) + "?"; - // Add the fractional digits. - pattern += @"(\d{"; - // Determine the number of fractional digits in currency values. - pattern += nfi.CurrencyDecimalDigits.ToString() + "})?){1}$"; - - Console.WriteLine($"Pattern is {pattern}\n"); - - Regex rgx = new Regex(pattern); - - // Define some test strings. - string[] tests = { "-42", "19.99", "0.001", "100 USD", - ".34", "0.34", "1,052.21", "$10.62", - "+1.43", "-$0.23" }; - - // Check each test string against the regular expression. - foreach (string test in tests) - { - if (rgx.IsMatch(test)) - Console.WriteLine($"{test} is a currency value."); - else - Console.WriteLine($"{test} is not a currency value."); - } - } -} -// The example displays the following output: -// Pattern is ^\s*[\+-]?\s?\$?\s?(\d*\.?(\d{2})?){1}$ -// -// -42 is a currency value. -// 19.99 is a currency value. -// 0.001 is not a currency value. -// 100 USD is not a currency value. -// .34 is a currency value. -// 0.34 is a currency value. -// 1,052.21 is not a currency value. -// $10.62 is a currency value. -// +1.43 is a currency value. -// -$0.23 is a currency value. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/words.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/words.cs deleted file mode 100644 index ad56a166dde42..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/csharp/words.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -using System; -using System.Text.RegularExpressions; - -public class Test -{ - public static void Main () - { -// - // Define a regular expression for repeated words. - Regex rx = new Regex(@"\b(?\w+)\s+(\k)\b", - RegexOptions.Compiled | RegexOptions.IgnoreCase); -// - - // Define a test string. - string text = "The the quick brown fox fox jumps over the lazy dog dog."; - -// - // Find matches. - MatchCollection matches = rx.Matches(text); -// - -// - // Report the number of matches found. - Console.WriteLine($"{matches.Count} matches found in:\n {text}"); -// - -// - // Report on each match. - foreach (Match match in matches) - { - GroupCollection groups = match.Groups; - Console.WriteLine($"'{groups["word"].Value}' repeated at positions {groups[0].Index} and {groups[1].Index}"); - } -// - } -} - -// The example produces the following output to the console: -// 3 matches found in: -// The the quick brown fox fox jumps over the lazy dog dog. -// 'The' repeated at positions 0 and 4 -// 'fox' repeated at positions 20 and 25 -// 'dog' repeated at positions 49 and 53 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/regex_example1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/regex_example1.vb deleted file mode 100644 index 90511bb655ed5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/regex_example1.vb +++ /dev/null @@ -1,63 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Text.RegularExpressions - -Public Module Example - Public Sub Main() - ' Get the current NumberFormatInfo object to build the regular - ' expression pattern dynamically. - Dim nfi As NumberFormatInfo = CultureInfo.GetCultureInfo("en-US").NumberFormat - - ' Define the regular expression pattern. - Dim pattern As String - pattern = "^\s*[" - ' Get the positive and negative sign symbols. - pattern += Regex.Escape(nfi.PositiveSign + nfi.NegativeSign) + "]?\s?" - ' Get the currency symbol. - pattern += Regex.Escape(nfi.CurrencySymbol) + "?\s?" - ' Add integral digits to the pattern. - pattern += "(\d*" - ' Add the decimal separator. - pattern += Regex.Escape(nfi.CurrencyDecimalSeparator) + "?" - ' Add the fractional digits. - pattern += "(\d{" - ' Determine the number of fractional digits in currency values. - pattern += nfi.CurrencyDecimalDigits.ToString() + "})?){1}$" - - Console.WriteLine("Pattern is {0}", pattern) - Console.WriteLine() - - Dim rgx As New Regex(pattern) - - ' Define some test strings. - Dim tests() As String = {"-42", "19.99", "0.001", "100 USD", _ - ".34", "0.34", "1,052.21", "$10.62", _ - "+1.43", "-$0.23" } - - ' Check each test string against the regular expression. - For Each test As String In tests - If rgx.IsMatch(test) Then - Console.WriteLine("{0} is a currency value.", test) - Else - Console.WriteLine("{0} is not a currency value.", test) - End If - Next - End Sub -End Module -' The example displays the following output: -' Pattern is ^\s*[\+-]?\s?\$?\s?(\d*\.?(\d{2})?){1}$ -' -' -42 is a currency value. -' 19.99 is a currency value. -' 0.001 is not a currency value. -' 100 USD is not a currency value. -' .34 is a currency value. -' 0.34 is a currency value. -' 1,052.21 is not a currency value. -' $10.62 is a currency value. -' +1.43 is a currency value. -' -$0.23 is a currency value. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/words.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/words.vb deleted file mode 100644 index 8c4afc19cb7ac..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Overview/vb/words.vb +++ /dev/null @@ -1,49 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text.RegularExpressions - -Public Module Test - - Public Sub Main() -' - ' Define a regular expression for repeated words. - Dim rx As New Regex("\b(?\w+)\s+(\k)\b", _ - RegexOptions.Compiled Or RegexOptions.IgnoreCase) -' - - ' Define a test string. - Dim text As String = "The the quick brown fox fox jumps over the lazy dog dog." - -' - ' Find matches. - Dim matches As MatchCollection = rx.Matches(text) -' - -' - ' Report the number of matches found. - Console.WriteLine("{0} matches found in:", matches.Count) - Console.WriteLine(" {0}", text) -' - -' - ' Report on each match. - For Each match As Match In matches - Dim groups As GroupCollection = match.Groups - Console.WriteLine("'{0}' repeated at positions {1} and {2}", _ - groups.Item("word").Value, _ - groups.Item(0).Index, _ - groups.Item(1).Index) - Next -' - End Sub -End Module -' The example produces the following output to the console: -' 3 matches found in: -' The the quick brown fox fox jumps over the lazy dog dog. -' 'The' repeated at positions 0 and 4 -' 'fox' repeated at positions 20 and 25 -' 'dog' repeated at positions 49 and 53 -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/getencoding1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/getencoding1.cs deleted file mode 100644 index 3456efe6bf14e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/csharp/getencoding1.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -using System; -using System.Text; - -public class Example -{ - public static void Main() - { - Encoding enc = Encoding.GetEncoding(1253); - Encoding altEnc = Encoding.GetEncoding("windows-1253"); - Console.WriteLine($"{enc.EncodingName} = Code Page {altEnc.CodePage}: {enc.Equals(altEnc)}"); - string greekAlphabet = "Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η " + - "Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ " + - "Ο ο Π π Ρ ρ Σ σ ς Τ τ Υ υ " + - "Φ φ Χ χ Ψ ψ Ω ω"; - Console.OutputEncoding = Encoding.UTF8; - byte[] bytes = enc.GetBytes(greekAlphabet); - Console.WriteLine("{0,-12} {1,20} {2,20:X2}", "Character", - "Unicode Code Point", "Code Page 1253"); - for (int ctr = 0; ctr < bytes.Length; ctr++) { - if (greekAlphabet[ctr].Equals(' ')) - continue; - - Console.WriteLine("{0,-12} {1,20} {2,20:X2}", greekAlphabet[ctr], - GetCodePoint(greekAlphabet[ctr]), bytes[ctr]); - } - } - - private static string GetCodePoint(char ch) - { - string retVal = "u+"; - byte[] bytes = Encoding.Unicode.GetBytes(ch.ToString()); - for (int ctr = bytes.Length - 1; ctr >= 0; ctr--) - retVal += bytes[ctr].ToString("X2"); - - return retVal; - } -} -// The example displays the following output: -// Character Unicode Code Point Code Page 1253 -// Α u+0391 C1 -// α u+03B1 E1 -// Β u+0392 C2 -// β u+03B2 E2 -// Γ u+0393 C3 -// γ u+03B3 E3 -// Δ u+0394 C4 -// δ u+03B4 E4 -// Ε u+0395 C5 -// ε u+03B5 E5 -// Ζ u+0396 C6 -// ζ u+03B6 E6 -// Η u+0397 C7 -// η u+03B7 E7 -// Θ u+0398 C8 -// θ u+03B8 E8 -// Ι u+0399 C9 -// ι u+03B9 E9 -// Κ u+039A CA -// κ u+03BA EA -// Λ u+039B CB -// λ u+03BB EB -// Μ u+039C CC -// μ u+03BC EC -// Ν u+039D CD -// ν u+03BD ED -// Ξ u+039E CE -// ξ u+03BE EE -// Ο u+039F CF -// ο u+03BF EF -// Π u+03A0 D0 -// π u+03C0 F0 -// Ρ u+03A1 D1 -// ρ u+03C1 F1 -// Σ u+03A3 D3 -// σ u+03C3 F3 -// ς u+03C2 F2 -// Τ u+03A4 D4 -// τ u+03C4 F4 -// Υ u+03A5 D5 -// υ u+03C5 F5 -// Φ u+03A6 D6 -// φ u+03C6 F6 -// Χ u+03A7 D7 -// χ u+03C7 F7 -// Ψ u+03A8 D8 -// ψ u+03C8 F8 -// Ω u+03A9 D9 -// ω u+03C9 F9 -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/getencoding1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/getencoding1.vb deleted file mode 100644 index 864777764d9a0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Encoding/Overview/vb/getencoding1.vb +++ /dev/null @@ -1,90 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example - Public Sub Main() - Dim enc As Encoding = Encoding.GetEncoding(1253) - Dim altEnc As Encoding = Encoding.GetEncoding("windows-1253") - Console.WriteLine("{0} = Code Page {1}: {2}", enc.EncodingName, - altEnc.CodePage, enc.Equals(altEnc)) - Dim greekAlphabet As String = "Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η " + - "Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ " + - "Ο ο Π π Ρ ρ Σ σ ς Τ τ Υ υ " + - "Φ φ Χ χ Ψ ψ Ω ω" - Console.OutputEncoding = Encoding.UTF8 - Dim bytes() As Byte = enc.GetBytes(greekAlphabet) - Console.WriteLine("{0,-12} {1,20} {2,20:X2}", "Character", - "Unicode Code Point", "Code Page 1253") - For ctr As Integer = 0 To bytes.Length - 1 - If greekAlphabet(ctr).Equals(" "c) Then Continue For - - Console.WriteLine("{0,-12} {1,20} {2,20:X2}", greekAlphabet(ctr), - GetCodePoint(greekAlphabet(ctr)), bytes(ctr)) - Next - - End Sub - - Private Function GetCodePoint(ch As String) As String - Dim retVal As String = "u+" - Dim bytes() As Byte = Encoding.Unicode.GetBytes(ch) - For ctr As Integer = bytes.Length - 1 To 0 Step -1 - retVal += bytes(ctr).ToString("X2") - Next - Return retVal - End Function -End Module -' The example displays the following output: -' Character Unicode Code Point Code Page 1253 -' Α u+0391 C1 -' α u+03B1 E1 -' Β u+0392 C2 -' β u+03B2 E2 -' Γ u+0393 C3 -' γ u+03B3 E3 -' Δ u+0394 C4 -' δ u+03B4 E4 -' Ε u+0395 C5 -' ε u+03B5 E5 -' Ζ u+0396 C6 -' ζ u+03B6 E6 -' Η u+0397 C7 -' η u+03B7 E7 -' Θ u+0398 C8 -' θ u+03B8 E8 -' Ι u+0399 C9 -' ι u+03B9 E9 -' Κ u+039A CA -' κ u+03BA EA -' Λ u+039B CB -' λ u+03BB EB -' Μ u+039C CC -' μ u+03BC EC -' Ν u+039D CD -' ν u+03BD ED -' Ξ u+039E CE -' ξ u+03BE EE -' Ο u+039F CF -' ο u+03BF EF -' Π u+03A0 D0 -' π u+03C0 F0 -' Ρ u+03A1 D1 -' ρ u+03C1 F1 -' Σ u+03A3 D3 -' σ u+03C3 F3 -' ς u+03C2 F2 -' Τ u+03A4 D4 -' τ u+03C4 F4 -' Υ u+03A5 D5 -' υ u+03C5 F5 -' Φ u+03A6 D6 -' φ u+03C6 F6 -' Χ u+03A7 D7 -' χ u+03C7 F7 -' Ψ u+03A8 D8 -' ψ u+03C8 F8 -' Ω u+03A9 D9 -' ω u+03C9 F9 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/caching1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/caching1.vb deleted file mode 100644 index 27d2a3705b3e1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/RegularExpressions/Overview/vb/caching1.vb +++ /dev/null @@ -1,53 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.IO -Imports System.Text.RegularExpressions - -Module Example - Public Sub Main() - Dim filename As String = ".\Caching1.txt" - ' - Dim sr As New StreamReader(filename) - Dim input As String - Dim pattern As String = "\b(\w+)\s\1\b" - Do While sr.Peek() >= 0 - input = sr.ReadLine() - Dim rgx As New Regex(pattern, RegexOptions.IgnoreCase) - Dim matches As MatchCollection = rgx.Matches(input) - If matches.Count > 0 Then - Console.WriteLine("{0} ({1} matches):", input, matches.Count) - For Each match As Match In matches - Console.WriteLine(" " + match.Value) - Next - End If - Loop - sr.Close() - ' - Console.WriteLine() - Main2() - End Sub - - Public Sub Main2() - Dim filename As String = ".\Caching1.txt" - ' - Dim sr As New StreamReader(filename) - Dim input As String - Dim pattern As String = "\b(\w+)\s\1\b" - Dim rgx As New Regex(pattern, RegexOptions.IgnoreCase) - Do While sr.Peek() >= 0 - input = sr.ReadLine() - Dim matches As MatchCollection = rgx.Matches(input) - If matches.Count > 0 Then - Console.WriteLine("{0} ({1} matches):", input, matches.Count) - For Each match As Match In matches - Console.WriteLine(" " + match.Value) - Next - End If - Loop - sr.Close() - ' - Console.WriteLine() - End Sub -End Module - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInSpan.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInSpan.cs deleted file mode 100644 index ba8dc14459e3d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInSpan.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security.Cryptography; -using System.Text; - -namespace RuneSamples -{ - public static class CountLettersInSpan - { - public static void Run() - { - Console.WriteLine($"Incorrect code: { CountLettersBadExample(new Span("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟".ToCharArray()))} letters in 𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - Console.WriteLine($" Correct code: { CountLetters(new Span("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟".ToCharArray()))} letters in 𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - - // - // THE FOLLOWING METHOD SHOWS INCORRECT CODE. - // DO NOT DO THIS IN A PRODUCTION APPLICATION. - static int CountLettersBadExample(ReadOnlySpan span) - { - int letterCount = 0; - - foreach (char ch in span) - { - if (char.IsLetter(ch)) - { letterCount++; } - } - - return letterCount; - } - // - - // - static int CountLetters(ReadOnlySpan span) - { - int letterCount = 0; - - foreach (Rune rune in span.EnumerateRunes()) - { - if (Rune.IsLetter(rune)) - { letterCount++; } - } - - return letterCount; - } - // - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInString.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInString.cs deleted file mode 100644 index cf7c5af02da30..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/CountLettersInString.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public static class CountLettersInString - { - public static void Run() - { - Console.WriteLine($"Incorrect code: { CountLettersBadExample("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟")} letters in 𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - Console.WriteLine($" Correct code: { CountLetters("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟")} letters in 𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - //Console.WriteLine($"String '𐓏𐓘𐓻𐓘𐓻𐓟𐒻𐓟' consists entirely of letters: { StringConsistsEntirelyOfLetters("𐓏𐓘𐓻𐓘𐓻𐓟𐒻𐓟")}"); - - // - // THE FOLLOWING METHOD SHOWS INCORRECT CODE. - // DO NOT DO THIS IN A PRODUCTION APPLICATION. - int CountLettersBadExample(string s) - { - int letterCount = 0; - - foreach (char ch in s) - { - if (char.IsLetter(ch)) - { letterCount++; } - } - - return letterCount; - } - // - - // - int CountLetters(string s) - { - int letterCount = 0; - - foreach (Rune rune in s.EnumerateRunes()) - { - if (Rune.IsLetter(rune)) - { letterCount++; } - } - - return letterCount; - } - // - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/EncodeRune.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/EncodeRune.cs deleted file mode 100644 index c39fe86f0837b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/EncodeRune.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public static class EncodeRune - { - public static void Run() - { - Console.WriteLine("Converting ox emoji to UTF-16 and UTF-8"); - Rune rune = Rune.GetRuneAt("🐂", 0); - Console.WriteLine($"Rune value: {rune.Value}"); - - // - char[] chars = new char[rune.Utf16SequenceLength]; - int numCharsWritten = rune.EncodeToUtf16(chars); - // - - Console.WriteLine($"Number of chars: {numCharsWritten}"); - - // - string theString = rune.ToString(); - // - - // - byte[] bytes = new byte[rune.Utf8SequenceLength]; - int numBytesWritten = rune.EncodeToUtf8(bytes); - // - - Console.WriteLine($"Number of UTF-8 bytes: {numBytesWritten}"); - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/FindFirstLetter.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/FindFirstLetter.cs deleted file mode 100644 index ec79966fb5b2f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/FindFirstLetter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public static class FindFirstLetter - { - public static void Run() - { - Console.WriteLine($"Index of first capital letter of Latin alphabet in \"𐓏𐓘𐓻𐓘𐓻𐓟F𐒻𐓟\": { GetIndexOfFirstAToZ("𐓏𐓘𐓻𐓘𐓻𐓟F𐒻𐓟")}"); - - // - int GetIndexOfFirstAToZ(string s) - { - for (int i = 0; i < s.Length; i++) - { - char thisChar = s[i]; - if ('A' <= thisChar && thisChar <= 'Z') - { - return i; // found a match - } - } - - return -1; // didn't find 'A' - 'Z' in the input string - } - // - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/InstantiateRunes.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/InstantiateRunes.cs deleted file mode 100644 index c48bfa1e4a8e4..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/InstantiateRunes.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public class InstantiateRunes - { - public static void Run() - { - // - Rune a = new Rune(0x0061); // LATIN SMALL LETTER A - Rune b = new Rune(0x10421); // DESERET CAPITAL LETTER ER - // - - // - Rune c = new Rune('a'); - // - - // - Rune d = new Rune('\ud83d', '\udd2e'); // U+1F52E CRYSTAL BALL - // - - Console.WriteLine($"Rune a: {a}"); - Console.WriteLine($"Rune b: {b}"); - Console.WriteLine($"Rune c: {c}"); - Console.WriteLine($"Rune d: {d}"); - Console.WriteLine($"Rune d code point: {d.Value}"); - - // - Rune rune = new Rune('\ud83d', '\udd2e'); // U+1F52E CRYSTAL BALL - int codePoint = rune.Value; // = 128302 decimal (= 0x1F52E) - // - - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/SplitStringOnChar.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/SplitStringOnChar.cs deleted file mode 100644 index 896039be8f5bf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/SplitStringOnChar.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public static class SplitStringOnChar - { - public static void Run() - { - // - string inputString = "🐂, 🐄, 🐆"; - string[] splitOnSpace = inputString.Split(' '); - string[] splitOnComma = inputString.Split(','); - // - - Console.WriteLine($"Splitting string {inputString} on space"); - Array.ForEach(splitOnSpace, s => Console.WriteLine(s)); - - Console.WriteLine($"Splitting string {inputString} on comma"); - Array.ForEach(splitOnComma, s => Console.WriteLine(s)); - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/TrimNonLettersAndNonDigits.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/TrimNonLettersAndNonDigits.cs deleted file mode 100644 index fc339d6489403..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/TrimNonLettersAndNonDigits.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Buffers; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - class TrimNonLettersAndNonDigits - { - public static void Run() - { - char[] s = "!Hello!".ToCharArray(); - ReadOnlySpan span = new ReadOnlySpan(s); - Console.WriteLine(span.ToString()); - ReadOnlySpan newSpan = TrimNonLettersAndNonDigits(span); - Console.WriteLine(newSpan.ToString()); - - // - static ReadOnlySpan TrimNonLettersAndNonDigits(ReadOnlySpan span) - { - // First, trim from the front. - // If any Rune can't be decoded - // (return value is anything other than "Done"), - // or if the Rune is a letter or digit, - // stop trimming from the front and - // instead work from the end. - while (Rune.DecodeFromUtf16(span, out Rune rune, out int charsConsumed) == OperationStatus.Done) - { - if (Rune.IsLetterOrDigit(rune)) - { break; } - span = span[charsConsumed..]; - } - - // Next, trim from the end. - // If any Rune can't be decoded, - // or if the Rune is a letter or digit, - // break from the loop, and we're finished. - while (Rune.DecodeLastFromUtf16(span, out Rune rune, out int charsConsumed) == OperationStatus.Done) - { - if (Rune.IsLetterOrDigit(rune)) - { break; } - span = span[..^charsConsumed]; - } - - return span; - } - // - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/WorkWithSurrogates.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/WorkWithSurrogates.cs deleted file mode 100644 index e9a7c23c2e73f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/csharp/WorkWithSurrogates.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace RuneSamples -{ - public static class WorkWithSurrogates - { - public static void Run() - { - ProcessStringUseChar("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - ProcessStringUseRune("𐓏𐓘𐓻𐓘𐓻𐓟 𐒻𐓟"); - - // - static void ProcessStringUseChar(string s) - { - Console.WriteLine("Using char"); - - for (int i = 0; i < s.Length; i++) - { - if (!char.IsSurrogate(s[i])) - { - Console.WriteLine($"Code point: {(int)(s[i])}"); - } - else if (i + 1 < s.Length && char.IsSurrogatePair(s[i], s[i + 1])) - { - int codePoint = char.ConvertToUtf32(s[i], s[i + 1]); - Console.WriteLine($"Code point: {codePoint}"); - i++; // so that when the loop iterates it's actually +2 - } - else - { - throw new Exception("String was not well-formed UTF-16."); - } - } - } - // - - // - static void ProcessStringUseRune(string s) - { - Console.WriteLine("Using Rune"); - - for (int i = 0; i < s.Length;) - { - if (!Rune.TryGetRuneAt(s, i, out Rune rune)) - { - throw new Exception("String was not well-formed UTF-16."); - } - - Console.WriteLine($"Code point: {rune.Value}"); - i += rune.Utf16SequenceLength; // increment the iterator by the number of chars in this Rune - } - } - // - - } - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/fsharp/CountLettersInString.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/fsharp/CountLettersInString.fs deleted file mode 100644 index 73be5587bff0f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/Rune/Overview/fsharp/CountLettersInString.fs +++ /dev/null @@ -1,28 +0,0 @@ -open System -open System.Text - -// -// THE FOLLOWING METHOD SHOWS INCORRECT CODE. -// DO NOT DO THIS IN A PRODUCTION APPLICATION. -let countLettersBadExample (s: string) = - let mutable letterCount = 0 - - for ch in s do - if Char.IsLetter ch then - letterCount <- letterCount + 1 - - letterCount - -// - -// -let countLetters (s: string) = - let mutable letterCount = 0 - - for rune in s.EnumerateRunes() do - if Rune.IsLetter rune then - letterCount <- letterCount + 1 - - letterCount - -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/Project.csproj deleted file mode 100644 index 22dd9034898ba..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/Project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Library - net10.0 - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call1.cs deleted file mode 100644 index ed96e1ca314d7..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call1.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -using System; -using System.Text; - -public class Example -{ - public static void Main() - { - StringBuilder sb = new StringBuilder(); - sb.Append("This is the beginning of a sentence, "); - sb.Replace("the beginning of ", ""); - sb.Insert(sb.ToString().IndexOf("a ") + 2, "complete "); - sb.Replace(",", "."); - Console.WriteLine(sb.ToString()); - } -} -// The example displays the following output: -// This is a complete sentence. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call2.cs deleted file mode 100644 index 9fe17b881dfea..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/call2.cs +++ /dev/null @@ -1,17 +0,0 @@ -// -using System; -using System.Text; - -public class Example2 -{ - public static void Main() - { - StringBuilder sb = new StringBuilder("This is the beginning of a sentence, "); - sb.Replace("the beginning of ", "").Insert(sb.ToString().IndexOf("a ") + 2, - "complete ").Replace(",", "."); - Console.WriteLine(sb.ToString()); - } -} -// The example displays the following output: -// This is a complete sentence. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/chars1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/chars1.cs deleted file mode 100644 index 85b3c3c664502..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/chars1.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -using System; -using System.Globalization; -using System.Text; - -public class Example3 -{ - public static void Main() - { - Random rnd = new Random(); - StringBuilder sb = new StringBuilder(); - - // Generate 10 random numbers and store them in a StringBuilder. - for (int ctr = 0; ctr <= 9; ctr++) - sb.Append(rnd.Next().ToString("N5")); - - Console.WriteLine("The original string:"); - Console.WriteLine(sb.ToString()); - - // Decrease each number by one. - for (int ctr = 0; ctr < sb.Length; ctr++) - { - if (Char.GetUnicodeCategory(sb[ctr]) == UnicodeCategory.DecimalDigitNumber) - { - int number = (int)Char.GetNumericValue(sb[ctr]); - number--; - if (number < 0) number = 9; - - sb[ctr] = number.ToString()[0]; - } - } - Console.WriteLine("\nThe new string:"); - Console.WriteLine(sb.ToString()); - } -} -// The example displays the following output: -// The original string: -// 1,457,531,530.00000940,522,609.000001,668,113,564.000001,998,992,883.000001,792,660,834.00 -// 000101,203,251.000002,051,183,075.000002,066,000,067.000001,643,701,043.000001,702,382,508 -// .00000 -// -// The new string: -// 0,346,420,429.99999839,411,598.999990,557,002,453.999990,887,881,772.999990,681,559,723.99 -// 999090,192,140.999991,940,072,964.999991,955,999,956.999990,532,690,932.999990,691,271,497 -// .99999 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/default1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/default1.cs deleted file mode 100644 index 76998f10013ce..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/default1.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -using System; -using System.Reflection; -using System.Text; - -public class Example4 -{ - public static void Main() - { - StringBuilder sb = new StringBuilder(); - ShowSBInfo(sb); - sb.Append("This is a sentence."); - ShowSBInfo(sb); - for (int ctr = 0; ctr <= 10; ctr++) - { - sb.Append("This is an additional sentence."); - ShowSBInfo(sb); - } - } - - private static void ShowSBInfo(StringBuilder sb) - { - foreach (var prop in sb.GetType().GetProperties()) - { - if (prop.GetIndexParameters().Length == 0) - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)); - } - Console.WriteLine(); - } -} -// The example displays the following output: -// Capacity: 16 MaxCapacity: 2,147,483,647 Length: 0 -// Capacity: 32 MaxCapacity: 2,147,483,647 Length: 19 -// Capacity: 64 MaxCapacity: 2,147,483,647 Length: 50 -// Capacity: 128 MaxCapacity: 2,147,483,647 Length: 81 -// Capacity: 128 MaxCapacity: 2,147,483,647 Length: 112 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 143 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 174 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 205 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 236 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 267 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 298 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 329 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 360 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/delete1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/delete1.cs deleted file mode 100644 index 4d12e85f086ee..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/delete1.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -using System; -using System.Text; - -public class Example5 -{ - public static void Main() - { - StringBuilder sb = new StringBuilder("A StringBuilder object"); - ShowSBInfo(sb); - // Remove "object" from the text. - string textToRemove = "object"; - int pos = sb.ToString().IndexOf(textToRemove); - if (pos >= 0) - { - sb.Remove(pos, textToRemove.Length); - ShowSBInfo(sb); - } - // Clear the StringBuilder contents. - sb.Clear(); - ShowSBInfo(sb); - } - - public static void ShowSBInfo(StringBuilder sb) - { - Console.WriteLine($"\nValue: {sb.ToString()}"); - foreach (var prop in sb.GetType().GetProperties()) - { - if (prop.GetIndexParameters().Length == 0) - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)); - } - Console.WriteLine(); - } -} -// The example displays the following output: -// Value: A StringBuilder object -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 22 -// -// Value: A StringBuilder -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 16 -// -// Value: -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 0 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/expand1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/expand1.cs deleted file mode 100644 index 251766cd3414d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/expand1.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -using System; -using System.Text; - -public class Example6 -{ - public static void Main() - { - // Create a StringBuilder object with no text. - StringBuilder sb = new StringBuilder(); - // Append some text. - sb.Append('*', 10).Append(" Adding Text to a StringBuilder Object ").Append('*', 10); - sb.AppendLine("\n"); - sb.AppendLine("Some code points and their corresponding characters:"); - // Append some formatted text. - for (int ctr = 50; ctr <= 60; ctr++) - { - sb.AppendFormat("{0,12:X4} {1,12}", ctr, Convert.ToChar(ctr)); - sb.AppendLine(); - } - // Find the end of the introduction to the column. - int pos = sb.ToString().IndexOf("characters:") + 11 + - Environment.NewLine.Length; - // Insert a column header. - sb.Insert(pos, String.Format("{2}{0,12:X4} {1,12}{2}", "Code Unit", - "Character", "\n")); - - // Convert the StringBuilder to a string and display it. - Console.WriteLine(sb.ToString()); - } -} -// The example displays the following output: -// ********** Adding Text to a StringBuilder Object ********** -// -// Some code points and their corresponding characters: -// -// Code Unit Character -// 0032 2 -// 0033 3 -// 0034 4 -// 0035 5 -// 0036 6 -// 0037 7 -// 0038 8 -// 0039 9 -// 003A : -// 003B ; -// 003C < -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/immutability2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/immutability2.cs deleted file mode 100644 index 1bdd80a7212c4..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/immutability2.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -using System; - -public class Example7 -{ - public unsafe static void Main() - { - string value = "This is the first sentence" + "."; - fixed (char* start = value) - { - value = String.Concat(value, "This is the second sentence. "); - fixed (char* current = value) - { - Console.WriteLine(start == current); - } - } - } -} -// The example displays the following output: -// False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/instantiate1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/instantiate1.cs deleted file mode 100644 index 0d91bfb11e786..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/instantiate1.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -using System; -using System.Text; - -public class Example8 -{ - public static void Main() - { - string value = "An ordinary string"; - int index = value.IndexOf("An ") + 3; - int capacity = 0xFFFF; - - // Instantiate a StringBuilder from a string. - StringBuilder sb1 = new StringBuilder(value); - ShowSBInfo(sb1); - - // Instantiate a StringBuilder from string and define a capacity. - StringBuilder sb2 = new StringBuilder(value, capacity); - ShowSBInfo(sb2); - - // Instantiate a StringBuilder from substring and define a capacity. - StringBuilder sb3 = new StringBuilder(value, index, - value.Length - index, - capacity); - ShowSBInfo(sb3); - } - - public static void ShowSBInfo(StringBuilder sb) - { - Console.WriteLine($"\nValue: {sb.ToString()}"); - foreach (var prop in sb.GetType().GetProperties()) - { - if (prop.GetIndexParameters().Length == 0) - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)); - } - Console.WriteLine(); - } -} -// The example displays the following output: -// Value: An ordinary string -// Capacity: 18 MaxCapacity: 2,147,483,647 Length: 18 -// -// Value: An ordinary string -// Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 18 -// -// Value: ordinary string -// Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 15 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern1.cs deleted file mode 100644 index afb671908bd2b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern1.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -using System; -using System.Text; - -public class Example9 -{ - public static void Main() - { - Random rnd = new Random(); - string[] tempF = { "47.6F", "51.3F", "49.5F", "62.3F" }; - string[] tempC = { "21.2C", "16.1C", "23.5C", "22.9C" }; - string[][] temps = { tempF, tempC }; - - StringBuilder sb = new StringBuilder(); - var f = new StringBuilderFinder(sb, "F"); - var baseDate = new DateTime(2013, 5, 1); - String[] temperatures = temps[rnd.Next(2)]; - bool isFahrenheit = false; - foreach (var temperature in temperatures) - { - if (isFahrenheit) - sb.AppendFormat("{0:d}: {1}\n", baseDate, temperature); - else - isFahrenheit = f.SearchAndAppend(String.Format("{0:d}: {1}\n", - baseDate, temperature)); - baseDate = baseDate.AddDays(1); - } - if (isFahrenheit) - { - sb.Insert(0, "Average Daily Temperature in Degrees Fahrenheit"); - sb.Insert(47, "\n\n"); - } - else - { - sb.Insert(0, "Average Daily Temperature in Degrees Celsius"); - sb.Insert(44, "\n\n"); - } - Console.WriteLine(sb.ToString()); - } -} - -public class StringBuilderFinder -{ - private StringBuilder sb; - private String text; - - public StringBuilderFinder(StringBuilder sb, String textToFind) - { - this.sb = sb; - this.text = textToFind; - } - - public bool SearchAndAppend(String stringToSearch) - { - sb.Append(stringToSearch); - return stringToSearch.Contains(text); - } -} -// The example displays output similar to the following: -// Average Daily Temperature in Degrees Celsius -// -// 5/1/2013: 21.2C -// 5/2/2013: 16.1C -// 5/3/2013: 23.5C -// 5/4/2013: 22.9C -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern2.cs deleted file mode 100644 index baa5e9f78d891..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern2.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -using System; -using System.Text; -using System.Text.RegularExpressions; - -public class Example10 -{ - public static void Main() - { - // Create a StringBuilder object with 4 successive occurrences - // of each character in the English alphabet. - StringBuilder sb = new StringBuilder(); - for (ushort ctr = (ushort)'a'; ctr <= (ushort)'z'; ctr++) - sb.Append(Convert.ToChar(ctr), 4); - - // Create a parallel string object. - String sbString = sb.ToString(); - // Determine where each new character sequence begins. - String pattern = @"(\w)\1+"; - MatchCollection matches = Regex.Matches(sbString, pattern); - - // Uppercase the first occurrence of the sequence, and separate it - // from the previous sequence by an underscore character. - for (int ctr = matches.Count - 1; ctr >= 0; ctr--) - { - Match m = matches[ctr]; - sb[m.Index] = Char.ToUpper(sb[m.Index]); - if (m.Index > 0) sb.Insert(m.Index, "_"); - } - // Display the resulting string. - sbString = sb.ToString(); - int line = 0; - do - { - int nChars = line * 80 + 79 <= sbString.Length ? - 80 : sbString.Length - line * 80; - Console.WriteLine(sbString.Substring(line * 80, nChars)); - line++; - } while (line * 80 < sbString.Length); - } -} -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern3.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern3.cs deleted file mode 100644 index 4415ba820ca29..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern3.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -using System; -using System.Text; - -public class Example11 -{ - public static void Main() - { - // Create a StringBuilder object with 4 successive occurrences - // of each character in the English alphabet. - StringBuilder sb = new StringBuilder(); - for (ushort ctr = (ushort)'a'; ctr <= (ushort)'z'; ctr++) - sb.Append(Convert.ToChar(ctr), 4); - - // Iterate the text to determine when a new character sequence occurs. - int position = 0; - Char current = '\u0000'; - do - { - if (sb[position] != current) - { - current = sb[position]; - sb[position] = Char.ToUpper(sb[position]); - if (position > 0) - sb.Insert(position, "_"); - position += 2; - } - else - { - position++; - } - } while (position <= sb.Length - 1); - // Display the resulting string. - String sbString = sb.ToString(); - int line = 0; - do - { - int nChars = line * 80 + 79 <= sbString.Length ? - 80 : sbString.Length - line * 80; - Console.WriteLine(sbString.Substring(line * 80, nChars)); - line++; - } while (line * 80 < sbString.Length); - } -} -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern4.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern4.cs deleted file mode 100644 index c19bb283e947f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/pattern4.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -using System; -using System.Text; -using System.Text.RegularExpressions; - -public class Example12 -{ - public static void Main() - { - // Create a StringBuilder object with 4 successive occurrences - // of each character in the English alphabet. - StringBuilder sb = new StringBuilder(); - for (ushort ctr = (ushort)'a'; ctr <= (ushort)'z'; ctr++) - sb.Append(Convert.ToChar(ctr), 4); - - // Convert it to a string. - String sbString = sb.ToString(); - - // Use a regex to uppercase the first occurrence of the sequence, - // and separate it from the previous sequence by an underscore. - string pattern = @"(\w)(\1+)"; - sbString = Regex.Replace(sbString, pattern, - m => (m.Index > 0 ? "_" : "") + - m.Groups[1].Value.ToUpper() + - m.Groups[2].Value); - - // Display the resulting string. - int line = 0; - do - { - int nChars = line * 80 + 79 <= sbString.Length ? - 80 : sbString.Length - line * 80; - Console.WriteLine(sbString.Substring(line * 80, nChars)); - line++; - } while (line * 80 < sbString.Length); - } -} -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/replace1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/replace1.cs deleted file mode 100644 index 10cbf95094824..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/csharp/replace1.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -using System; -using System.Text; - -public class Example13 -{ - public static void Main() - { - StringBuilder MyStringBuilder = new StringBuilder("Hello World!"); - MyStringBuilder.Replace('!', '?'); - Console.WriteLine(MyStringBuilder); - } -} -// The example displays the following output: -// Hello World? -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call1.fs deleted file mode 100644 index d60dc11f6918b..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call1.fs +++ /dev/null @@ -1,13 +0,0 @@ -module call1 -// -open System.Text - -let sb = StringBuilder() -sb.Append "This is the beginning of a sentence, " |> ignore -sb.Replace("the beginning of ", "") |> ignore -sb.Insert((string sb).IndexOf "a " + 2, "complete ") |> ignore -sb.Replace(",", ".") |> ignore -printfn $"{sb}" -// The example displays the following output: -// This is a complete sentence. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call2.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call2.fs deleted file mode 100644 index 5433db9d95fca..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/call2.fs +++ /dev/null @@ -1,16 +0,0 @@ -module call2 -// -open System.Text - -let sb = StringBuilder "This is the beginning of a sentence, " - -sb - .Replace("the beginning of ", "") - .Insert((string sb).IndexOf "a " + 2, "complete ") - .Replace(",", ".") -|> ignore - -printfn $"{sb}" -// The example displays the following output: -// This is a complete sentence. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/chars1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/chars1.fs deleted file mode 100644 index 4d6cd351d0c55..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/chars1.fs +++ /dev/null @@ -1,38 +0,0 @@ -module chars1 -// -open System -open System.Globalization -open System.Text - -let rnd = Random() -let sb = new StringBuilder() - -// Generate 10 random numbers and store them in a StringBuilder. -for _ = 0 to 9 do - rnd.Next().ToString "N5" |> sb.Append |> ignore - -printfn "The original string:" -printfn $"{sb}" - -// Decrease each number by one. -for i = 0 to sb.Length - 1 do - if Char.GetUnicodeCategory(sb[i]) = UnicodeCategory.DecimalDigitNumber then - let number = Char.GetNumericValue sb.[i] |> int - let number = number - 1 - let number = if number < 0 then 9 else number - sb.[i] <- number.ToString()[0] - -printfn "\nThe new string:" -printfn $"{sb}" - -// The example displays the following output: -// The original string: -// 1,457,531,530.00000940,522,609.000001,668,113,564.000001,998,992,883.000001,792,660,834.00 -// 000101,203,251.000002,051,183,075.000002,066,000,067.000001,643,701,043.000001,702,382,508 -// .00000 -// -// The new string: -// 0,346,420,429.99999839,411,598.999990,557,002,453.999990,887,881,772.999990,681,559,723.99 -// 999090,192,140.999991,940,072,964.999991,955,999,956.999990,532,690,932.999990,691,271,497 -// .99999 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/default1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/default1.fs deleted file mode 100644 index e5c8f67c8d3aa..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/default1.fs +++ /dev/null @@ -1,36 +0,0 @@ -module default1 - -// -open System.Text - -let showSBInfo (sb: StringBuilder) = - for prop in sb.GetType().GetProperties() do - if prop.GetIndexParameters().Length = 0 then - printf $"{prop.Name}: {prop.GetValue sb:N0} " - - printfn "" - -let sb = StringBuilder() -showSBInfo sb -sb.Append "This is a sentence." |> ignore -showSBInfo sb - -for i = 0 to 10 do - sb.Append "This is an additional sentence." |> ignore - showSBInfo sb - -// The example displays the following output: -// Capacity: 16 MaxCapacity: 2,147,483,647 Length: 0 -// Capacity: 32 MaxCapacity: 2,147,483,647 Length: 19 -// Capacity: 64 MaxCapacity: 2,147,483,647 Length: 50 -// Capacity: 128 MaxCapacity: 2,147,483,647 Length: 81 -// Capacity: 128 MaxCapacity: 2,147,483,647 Length: 112 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 143 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 174 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 205 -// Capacity: 256 MaxCapacity: 2,147,483,647 Length: 236 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 267 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 298 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 329 -// Capacity: 512 MaxCapacity: 2,147,483,647 Length: 360 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/delete1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/delete1.fs deleted file mode 100644 index 35b188a14ebc6..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/delete1.fs +++ /dev/null @@ -1,35 +0,0 @@ -module delete1 -// -open System.Text - -let showSBInfo (sb: StringBuilder) = - for prop in sb.GetType().GetProperties() do - if prop.GetIndexParameters().Length = 0 then - printf $"{prop.Name}: {prop.GetValue sb:N0} " - - printfn "" - -let sb = StringBuilder "A StringBuilder object" -showSBInfo sb -// Remove "object" from the text. -let textToRemove = "object" -let pos = (string sb).IndexOf textToRemove - -if pos >= 0 then - sb.Remove(pos, textToRemove.Length) |> ignore - showSBInfo sb - -// Clear the StringBuilder contents. -sb.Clear() |> ignore -showSBInfo sb - -// The example displays the following output: -// Value: A StringBuilder object -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 22 -// -// Value: A StringBuilder -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 16 -// -// Value: -// Capacity: 22 MaxCapacity: 2,147,483,647 Length: 0 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/expand1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/expand1.fs deleted file mode 100644 index f82c1e6c56f10..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/expand1.fs +++ /dev/null @@ -1,49 +0,0 @@ -module expand1 -// -open System -open System.Text - -// Create a StringBuilder object with no text. -let sb = StringBuilder() -// Append some text. -sb - .Append('*', 10) - .Append(" Adding Text to a StringBuilder Object ") - .Append('*', 10) -|> ignore - -sb.AppendLine "\n" |> ignore -sb.AppendLine "Some code points and their corresponding characters:" |> ignore -// Append some formatted text. -for i = 50 to 60 do - sb.AppendFormat("{0,12:X4} {1,12}", i, Convert.ToChar i) |> ignore - sb.AppendLine() |> ignore - -// Find the end of the introduction to the column. -let pos = (string sb).IndexOf("characters:") + 11 + Environment.NewLine.Length -// Insert a column header. -sb.Insert(pos, String.Format("{2}{0,12:X4} {1,12}{2}", "Code Unit", "Character", "\n")) -|> ignore - -// Convert the StringBuilder to a string and display it. -printfn $"{sb}" - - -// The example displays the following output: -// ********** Adding Text to a StringBuilder Object ********** -// -// Some code points and their corresponding characters: -// -// Code Unit Character -// 0032 2 -// 0033 3 -// 0034 4 -// 0035 5 -// 0036 6 -// 0037 7 -// 0038 8 -// 0039 9 -// 003A : -// 003B ; -// 003C < -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/immutability2.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/immutability2.fs deleted file mode 100644 index d4805eb10f8cf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/immutability2.fs +++ /dev/null @@ -1,14 +0,0 @@ -module immutability2 - -#nowarn "9" - -do - // - let mutable value = "This is the first sentence" + "." - use start = fixed value - value <- System.String.Concat(value, "This is the second sentence. ") - use current = fixed value - printfn $"{start = current}" -// The example displays the following output: -// False -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/instantiate1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/instantiate1.fs deleted file mode 100644 index 9517a7fc9d63f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/instantiate1.fs +++ /dev/null @@ -1,37 +0,0 @@ -module instantiate1 -// -open System.Text - -let showSBInfo (sb: StringBuilder) = - for prop in sb.GetType().GetProperties() do - if prop.GetIndexParameters().Length = 0 then - printf $"{prop.Name}: {prop.GetValue sb:N0} " - - printfn "" - -let value = "An ordinary string" -let index = value.IndexOf "An " + 3 -let capacity = 0xFFFF - -// Instantiate a StringBuilder from a string. -let sb1 = StringBuilder value -showSBInfo sb1 - -// Instantiate a StringBuilder from string and define a capacity. -let sb2 = StringBuilder(value, capacity) -showSBInfo sb2 - -// Instantiate a StringBuilder from substring and define a capacity. -let sb3 = StringBuilder(value, index, value.Length - index, capacity) -showSBInfo sb3 - -// The example displays the following output: -// Value: An ordinary string -// Capacity: 18 MaxCapacity: 2,147,483,647 Length: 18 -// -// Value: An ordinary string -// Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 18 -// -// Value: ordinary string -// Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 15 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern1.fs deleted file mode 100644 index f8db4f7397c29..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern1.fs +++ /dev/null @@ -1,46 +0,0 @@ -module pattern1 -// -open System -open System.Text - -type StringBuilderFinder(sb: StringBuilder, textToFind: string) = - member _.SearchAndAppend(stringToSearch: string) = - sb.Append stringToSearch |> ignore - stringToSearch.Contains textToFind - -let tempF = [| "47.6F"; "51.3F"; "49.5F"; "62.3F" |] -let tempC = [| "21.2C"; "16.1C"; "23.5C"; "22.9C" |] -let temps = [| tempF; tempC |] - -let sb = StringBuilder() -let f = StringBuilderFinder(sb, "F") -let temperatures = temps[Random.Shared.Next(2)] -let mutable baseDate = DateTime(2013, 5, 1) -let mutable isFahrenheit = false - -for temperature in temperatures do - if isFahrenheit then - sb.AppendFormat("{0:d}: {1}\n", baseDate, temperature) |> ignore - else - isFahrenheit <- $"{baseDate:d}: {temperature}\n" |> f.SearchAndAppend - - baseDate <- baseDate.AddDays 1 - -if isFahrenheit then - sb.Insert(0, "Average Daily Temperature in Degrees Fahrenheit") |> ignore - sb.Insert(47, "\n\n") |> ignore - -else - sb.Insert(0, "Average Daily Temperature in Degrees Celsius") |> ignore - sb.Insert(44, "\n\n") |> ignore - -printfn $"{sb}" - -// The example displays output similar to the following: -// Average Daily Temperature in Degrees Celsius -// -// 5/1/2013: 21.2C -// 5/2/2013: 16.1C -// 5/3/2013: 23.5C -// 5/4/2013: 22.9C -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern2.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern2.fs deleted file mode 100644 index 56521da543216..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern2.fs +++ /dev/null @@ -1,45 +0,0 @@ -module pattern2 -// -open System -open System.Text -open System.Text.RegularExpressions - -// Create a StringBuilder object with 4 successive occurrences -// of each character in the English alphabet. -let sb = StringBuilder() - -for char in 'a' .. 'z' do - sb.Append(char, 4) |> ignore - -// Create a parallel string object. -let sbString = string sb -// Determine where each new character sequence begins. -let pattern = @"(\w)\1+" -let matches = Regex.Matches(sbString, pattern) - -// Uppercase the first occurrence of the sequence, and separate it -// from the previous sequence by an underscore character. -for i = matches.Count - 1 downto 0 do - let m = matches[i] - sb[m.Index] <- Char.ToUpper sb[m.Index] - - if m.Index > 0 then - sb.Insert(m.Index, "_") |> ignore - -// Display the resulting string. -let sbString2 = string sb - -for line = 0 to (sbString2.Length - 1) / 80 do - let nChars = - if line * 80 + 79 <= sbString2.Length then - 80 - else - sbString2.Length - line * 80 - - printfn $"{sbString2.Substring(line * 80, nChars)}" - - -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern3.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern3.fs deleted file mode 100644 index c1d506a6b27ac..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern3.fs +++ /dev/null @@ -1,45 +0,0 @@ -module pattern3 -// -open System -open System.Text - -// Create a StringBuilder object with 4 successive occurrences -// of each character in the English alphabet. -let sb = StringBuilder() - -for char in 'a' .. 'z' do - sb.Append(char, 4) |> ignore - -// Iterate the text to determine when a new character sequence occurs. -let mutable position = 0 -let mutable current = '\u0000' - -while position <= sb.Length - 1 do - if sb[position] <> current then - current <- sb[position] - sb[position] <- Char.ToUpper sb[position] - - if position > 0 then - sb.Insert(position, "_") |> ignore - - position <- position + 2 - - else - position <- position + 1 - -// Display the resulting string. -let sbString = string sb - -for line = 0 to (sbString.Length - 1) / 80 do - let nChars = - if line * 80 + 79 <= sbString.Length then - 80 - else - sbString.Length - line * 80 - - printfn $"{sbString.Substring(line * 80, nChars)}" - -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern4.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern4.fs deleted file mode 100644 index 63f6caeab39fd..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/pattern4.fs +++ /dev/null @@ -1,43 +0,0 @@ -module pattern4 -// -open System.Text -open System.Text.RegularExpressions - -// Create a StringBuilder object with 4 successive occurrences -// of each character in the English alphabet. -let sb = StringBuilder() - -for char in 'a' .. 'z' do - sb.Append(char, 4) |> ignore - -// Convert it to a string. -let sbString = string sb - -// Use a regex to uppercase the first occurrence of the sequence, -// and separate it from the previous sequence by an underscore. -let pattern = @"(\w)(\1+)" - -let sbStringReplaced = - Regex.Replace( - sbString, - pattern, - fun m -> - (if m.Index > 0 then "_" else "") - + m.Groups[ 1 ].Value.ToUpper() - + m.Groups[2].Value - ) - -// Display the resulting string. -for line = 0 to (sbStringReplaced.Length - 1) / 80 do - let nChars = - if line * 80 + 79 <= sbStringReplaced.Length then - 80 - else - sbStringReplaced.Length - line * 80 - - printfn $"{sbStringReplaced.Substring(line * 80, nChars)}" - -// The example displays the following output: -// Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -// Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/replace1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/replace1.fs deleted file mode 100644 index 02b30af283397..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/fsharp/replace1.fs +++ /dev/null @@ -1,11 +0,0 @@ -module replace1 -// -open System.Text - -let myStringBuilder = StringBuilder "Hello World!" -myStringBuilder.Replace('!', '?') |> ignore -printfn $"{myStringBuilder}" - -// The example displays the following output: -// Hello World? -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call1.vb deleted file mode 100644 index 71c9e10dac04f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call1.vb +++ /dev/null @@ -1,19 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example2 - Public Sub Main() - Dim sb As New StringBuilder() - sb.Append("This is the beginning of a sentence, ") - sb.Replace("the beginning of ", "") - sb.Insert(sb.ToString().IndexOf("a ") + 2, "complete ") - sb.Replace(",", ".") - Console.WriteLine(sb.ToString()) - End Sub -End Module -' The example displays the following output: -' This is a complete sentence. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call2.vb deleted file mode 100644 index 358d0a456b471..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/call2.vb +++ /dev/null @@ -1,17 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example3 - Public Sub Main() - Dim sb As New StringBuilder("This is the beginning of a sentence, ") - sb.Replace("the beginning of ", "").Insert(sb.ToString().IndexOf("a ") + 2, - "complete ").Replace(", ", ".") - Console.WriteLine(sb.ToString()) - End Sub -End Module -' The example displays the following output: -' This is a complete sentence. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/chars1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/chars1.vb deleted file mode 100644 index 68f7824256a84..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/chars1.vb +++ /dev/null @@ -1,46 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Globalization -Imports System.Text - -Module Example4 - Public Sub Main() - Dim rnd As New Random() - Dim sb As New StringBuilder() - - ' Generate 10 random numbers and store them in a StringBuilder. - For ctr As Integer = 0 To 9 - sb.Append(rnd.Next().ToString("N5")) - Next - Console.WriteLine("The original string:") - Console.WriteLine(sb.ToString()) - Console.WriteLine() - - ' Decrease each number by one. - For ctr As Integer = 0 To sb.Length - 1 - If Char.GetUnicodeCategory(sb(ctr)) = UnicodeCategory.DecimalDigitNumber Then - Dim number As Integer = CType(Char.GetNumericValue(sb(ctr)), Integer) - number -= 1 - If number < 0 Then number = 9 - - sb(ctr) = number.ToString()(0) - End If - Next - Console.WriteLine("The new string:") - Console.WriteLine(sb.ToString()) - End Sub -End Module -' The example displays the following output: -' The original string: -' 1,457,531,530.00000940,522,609.000001,668,113,564.000001,998,992,883.000001,792,660,834.00 -' 000101,203,251.000002,051,183,075.000002,066,000,067.000001,643,701,043.000001,702,382,508 -' .00000 -' -' The new string: -' 0,346,420,429.99999839,411,598.999990,557,002,453.999990,887,881,772.999990,681,559,723.99 -' 999090,192,140.999991,940,072,964.999991,955,999,956.999990,532,690,932.999990,691,271,497 -' .99999 -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/default1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/default1.vb deleted file mode 100644 index 60388e491b39a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/default1.vb +++ /dev/null @@ -1,43 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Reflection -Imports System.Text - -Module Example5 - Public Sub Main() - Dim sb As New StringBuilder() - ShowSBInfo(sb) - sb.Append("This is a sentence.") - ShowSBInfo(sb) - For ctr As Integer = 0 To 10 - sb.Append("This is an additional sentence.") - ShowSBInfo(sb) - Next - End Sub - - Public Sub ShowSBInfo(sb As StringBuilder) - For Each prop In sb.GetType().GetProperties - If prop.GetIndexParameters().Length = 0 Then - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)) - End If - Next - Console.WriteLine() - End Sub -End Module -' The example displays the following output: -' Capacity: 16 MaxCapacity: 2,147,483,647 Length: 0 -' Capacity: 32 MaxCapacity: 2,147,483,647 Length: 19 -' Capacity: 64 MaxCapacity: 2,147,483,647 Length: 50 -' Capacity: 128 MaxCapacity: 2,147,483,647 Length: 81 -' Capacity: 128 MaxCapacity: 2,147,483,647 Length: 112 -' Capacity: 256 MaxCapacity: 2,147,483,647 Length: 143 -' Capacity: 256 MaxCapacity: 2,147,483,647 Length: 174 -' Capacity: 256 MaxCapacity: 2,147,483,647 Length: 205 -' Capacity: 256 MaxCapacity: 2,147,483,647 Length: 236 -' Capacity: 512 MaxCapacity: 2,147,483,647 Length: 267 -' Capacity: 512 MaxCapacity: 2,147,483,647 Length: 298 -' Capacity: 512 MaxCapacity: 2,147,483,647 Length: 329 -' Capacity: 512 MaxCapacity: 2,147,483,647 Length: 360 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/delete1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/delete1.vb deleted file mode 100644 index 905d4bd6f641d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/delete1.vb +++ /dev/null @@ -1,44 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example6 - Public Sub Main() - Dim sb As New StringBuilder("A StringBuilder object") - ShowSBInfo(sb) - ' Remove "object" from the text. - Dim textToRemove As String = "object" - Dim pos As Integer = sb.ToString().IndexOf(textToRemove) - If pos >= 0 Then - sb.Remove(pos, textToRemove.Length) - ShowSBInfo(sb) - End If - ' Clear the StringBuilder contents. - sb.Clear() - ShowSBInfo(sb) - End Sub - - Public Sub ShowSBInfo(sb As StringBuilder) - Console.WriteLine() - Console.WriteLine("Value: {0}", sb.ToString()) - For Each prop In sb.GetType().GetProperties - If prop.GetIndexParameters().Length = 0 Then - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)) - End If - Next - Console.WriteLine() - End Sub -End Module -' The example displays the following output: -' Value: A StringBuilder object -' Capacity: 22 MaxCapacity: 2,147,483,647 Length: 22 -' -' Value: A StringBuilder -' Capacity: 22 MaxCapacity: 2,147,483,647 Length: 16 -' -' Value: -' Capacity: 22 MaxCapacity: 2,147,483,647 Length: 0 -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/expand1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/expand1.vb deleted file mode 100644 index 21b2eee5489ad..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/expand1.vb +++ /dev/null @@ -1,49 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example7 - Public Sub Main() - ' Create a StringBuilder object with no text. - Dim sb As New StringBuilder() - ' Append some text. - sb.Append("*"c, 10).Append(" Adding Text to a StringBuilder Object ").Append("*"c, 10) - sb.AppendLine() - sb.AppendLine() - sb.AppendLine("Some code points and their corresponding characters:") - ' Append some formatted text. - For ctr = 50 To 60 - sb.AppendFormat("{0,12:X4} {1,12}", ctr, Convert.ToChar(ctr)) - sb.AppendLine() - Next - ' Find the end of the introduction to the column. - Dim pos As Integer = sb.ToString().IndexOf("characters:") + 11 + - Environment.NewLine.Length - ' Insert a column header. - sb.Insert(pos, String.Format("{2}{0,12:X4} {1,12}{2}", "Code Unit", - "Character", vbCrLf)) - - ' Convert the StringBuilder to a string and display it. - Console.WriteLine(sb.ToString()) - End Sub -End Module -' The example displays the following output: -' ********** Adding Text to a StringBuilder Object ********** -' -' Some code points and their corresponding characters: -' -' Code Unit Character -' 0032 2 -' 0033 3 -' 0034 4 -' 0035 5 -' 0036 6 -' 0037 7 -' 0038 8 -' 0039 9 -' 003A : -' 003B ; -' 003C < -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/instantiate1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/instantiate1.vb deleted file mode 100644 index a2ecb1f9a8c73..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/instantiate1.vb +++ /dev/null @@ -1,49 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example8 - Public Sub Main() - Dim value As String = "An ordinary string" - Dim index As Integer = value.IndexOf("An ") + 3 - Dim capacity As Integer = &HFFFF - - ' Instantiate a StringBuilder from a string. - Dim sb1 As New StringBuilder(value) - ShowSBInfo(sb1) - - ' Instantiate a StringBuilder from string and define a capacity. - Dim sb2 As New StringBuilder(value, capacity) - ShowSBInfo(sb2) - - ' Instantiate a StringBuilder from substring and define a capacity. - Dim sb3 As New StringBuilder(value, index, - value.Length - index, - capacity) - ShowSBInfo(sb3) - End Sub - - Public Sub ShowSBInfo(sb As StringBuilder) - Console.WriteLine() - Console.WriteLine("Value: {0}", sb.ToString()) - For Each prop In sb.GetType().GetProperties - If prop.GetIndexParameters().Length = 0 Then - Console.Write("{0}: {1:N0} ", prop.Name, prop.GetValue(sb)) - End If - Next - Console.WriteLine() - End Sub -End Module -' The example displays the following output: -' Value: An ordinary string -' Capacity: 18 MaxCapacity: 2,147,483,647 Length: 18 -' -' Value: An ordinary string -' Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 18 -' -' Value: ordinary string -' Capacity: 65,535 MaxCapacity: 2,147,483,647 Length: 15 -' - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern1.vb deleted file mode 100644 index bfef80bcabcdb..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern1.vb +++ /dev/null @@ -1,60 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example9 - Public Sub Main() - Dim rnd As New Random() - Dim tempF() As String = {"47.6F", "51.3F", "49.5F", "62.3F"} - Dim tempC() As String = {"21.2C", "16.1C", "23.5C", "22.9C"} - Dim temps()() As String = {tempF, tempC} - - Dim sb As StringBuilder = New StringBuilder() - Dim f As New StringBuilderFinder(sb, "F") - Dim baseDate As New DateTime(2013, 5, 1) - Dim temperatures() As String = temps(rnd.Next(2)) - Dim isFahrenheit As Boolean = False - For Each temperature In temperatures - If isFahrenheit Then - sb.AppendFormat("{0:d}: {1}{2}", baseDate, temperature, vbCrLf) - Else - isFahrenheit = f.SearchAndAppend(String.Format("{0:d}: {1}{2}", - baseDate, temperature, vbCrLf)) - End If - baseDate = baseDate.AddDays(1) - Next - If isFahrenheit Then - sb.Insert(0, "Average Daily Temperature in Degrees Fahrenheit") - sb.Insert(47, vbCrLf + vbCrLf) - Else - sb.Insert(0, "Average Daily Temperature in Degrees Celsius") - sb.Insert(44, vbCrLf + vbCrLf) - End If - Console.WriteLine(sb.ToString()) - End Sub -End Module - -Public Class StringBuilderFinder - Private sb As StringBuilder - Private text As String - - Public Sub New(sb As StringBuilder, textToFind As String) - Me.sb = sb - text = textToFind - End Sub - - Public Function SearchAndAppend(stringToSearch As String) As Boolean - sb.Append(stringToSearch) - Return stringToSearch.Contains(text) - End Function -End Class -' The example displays output similar to the following: -' Average Daily Temperature in Degrees Celsius -' -' 5/1/2013: 21.2C -' 5/2/2013: 16.1C -' 5/3/2013: 23.5C -' 5/4/2013: 22.9C -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern2.vb deleted file mode 100644 index 0fa2ece1e7b2a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern2.vb +++ /dev/null @@ -1,43 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text -Imports System.Text.RegularExpressions - -Module Example10 - Public Sub Main() - ' Create a StringBuilder object with 4 successive occurrences - ' of each character in the English alphabet. - Dim sb As New StringBuilder() - For ctr As UShort = AscW("a") To AscW("z") - sb.Append(ChrW(ctr), 4) - Next - ' Create a parallel string object. - Dim sbString As String = sb.ToString() - ' Determine where each new character sequence begins. - Dim pattern As String = "(\w)\1+" - Dim matches As MatchCollection = Regex.Matches(sbString, pattern) - - ' Uppercase the first occurrence of the sequence, and separate it - ' from the previous sequence by an underscore character. - For ctr As Integer = matches.Count - 1 To 0 Step -1 - Dim m As Match = matches(ctr) - sb.Chars(m.Index) = Char.ToUpper(sb.Chars(m.Index)) - If m.Index > 0 Then sb.Insert(m.Index, "_") - Next - ' Display the resulting string. - sbString = sb.ToString() - Dim line As Integer = 0 - Do - Dim nChars As Integer = If(line * 80 + 79 <= sbString.Length, - 80, sbString.Length - line * 80) - Console.WriteLine(sbString.Substring(line * 80, nChars)) - line += 1 - Loop While line * 80 < sbString.Length - End Sub -End Module -' The example displays the following output: -' Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -' Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern3.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern3.vb deleted file mode 100644 index 7ecbaa54107ab..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern3.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example11 - Public Sub Main() - ' Create a StringBuilder object with 4 successive occurrences - ' of each character in the English alphabet. - Dim sb As New StringBuilder() - For ctr As UShort = AscW("a") To AscW("z") - sb.Append(ChrW(ctr), 4) - Next - ' Iterate the text to determine when a new character sequence occurs. - Dim position As Integer = 0 - Dim current As Char = ChrW(0) - Do - If sb(position) <> current Then - current = sb(position) - sb(position) = Char.ToUpper(sb(position)) - If position > 0 Then sb.Insert(position, "_") - position += 2 - Else - position += 1 - End If - Loop While position <= sb.Length - 1 - ' Display the resulting string. - Dim sbString As String = sb.ToString() - Dim line As Integer = 0 - Do - Dim nChars As Integer = If(line * 80 + 79 <= sbString.Length, - 80, sbString.Length - line * 80) - Console.WriteLine(sbString.Substring(line * 80, nChars)) - line += 1 - Loop While line * 80 < sbString.Length - End Sub -End Module -' The example displays the following output: -' Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -' Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern4.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern4.vb deleted file mode 100644 index 9fb52dbd59600..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/pattern4.vb +++ /dev/null @@ -1,40 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text -Imports System.Text.RegularExpressions - -Module Example12 - Public Sub Main() - ' Create a StringBuilder object with 4 successive occurrences - ' of each character in the English alphabet. - Dim sb As New StringBuilder() - For ctr As UShort = AscW("a") To AscW("z") - sb.Append(ChrW(ctr), 4) - Next - ' Convert it to a string. - Dim sbString As String = sb.ToString() - - ' Use a regex to uppercase the first occurrence of the sequence, - ' and separate it from the previous sequence by an underscore. - Dim pattern As String = "(\w)(\1+)" - sbString = Regex.Replace(sbString, pattern, - Function(m) If(m.Index > 0, "_", "") + - m.Groups(1).Value.ToUpper + - m.Groups(2).Value) - - ' Display the resulting string. - Dim line As Integer = 0 - Do - Dim nChars As Integer = If(line * 80 + 79 <= sbString.Length, - 80, sbString.Length - line * 80) - Console.WriteLine(sbString.Substring(line * 80, nChars)) - line += 1 - Loop While line * 80 < sbString.Length - End Sub -End Module -' The example displays the following output: -' Aaaa_Bbbb_Cccc_Dddd_Eeee_Ffff_Gggg_Hhhh_Iiii_Jjjj_Kkkk_Llll_Mmmm_Nnnn_Oooo_Pppp_ -' Qqqq_Rrrr_Ssss_Tttt_Uuuu_Vvvv_Wwww_Xxxx_Yyyy_Zzzz -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/replace1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/replace1.vb deleted file mode 100644 index 7da78f82ca437..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Text/StringBuilder/Overview/vb/replace1.vb +++ /dev/null @@ -1,16 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Text - -Module Example - Public Sub Main() - Dim MyStringBuilder As New StringBuilder("Hello World!") - MyStringBuilder.Replace("!"c, "?"c) - Console.WriteLine(MyStringBuilder) - End Sub -End Module -' The example displays the following output: -' Hello World? -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Project.csproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait1.cs deleted file mode 100644 index 7f27f381cf28f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait1.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -class Program -{ - static Random rand = new Random(); - - static void Main() - { - // Wait on a single task with no timeout specified. - Task taskA = Task.Run( () => Thread.Sleep(2000)); - Console.WriteLine($"taskA Status: {taskA.Status}"); - try { - taskA.Wait(); - Console.WriteLine($"taskA Status: {taskA.Status}"); - } - catch (AggregateException) { - Console.WriteLine("Exception in taskA."); - } - } -} -// The example displays output like the following: -// taskA Status: WaitingToRun -// taskA Status: RanToCompletion -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait2.cs deleted file mode 100644 index 436768f8b6314..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/Wait2.cs +++ /dev/null @@ -1,30 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -public class Example5 -{ - public static void Main() - { - // Wait on a single task with a timeout specified. - Task taskA = Task.Run(() => Thread.Sleep(2000)); - try - { - taskA.Wait(1000); // Wait for 1 second. - bool completed = taskA.IsCompleted; - Console.WriteLine("Task A completed: {0}, Status: {1}", - completed, taskA.Status); - if (!completed) - Console.WriteLine("Timed out before task A completed."); - } - catch (AggregateException) - { - Console.WriteLine("Exception in taskA."); - } - } -} -// The example displays output like the following: -// Task A completed: False, Status: Running -// Timed out before task A completed. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll1.cs deleted file mode 100644 index d23bd899ded0c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll1.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -public class Example3 -{ - public static void Main() - { - // Wait for all tasks to complete. - Task[] tasks = new Task[10]; - for (int i = 0; i < 10; i++) - { - tasks[i] = Task.Run(() => Thread.Sleep(2000)); - } - try - { - Task.WaitAll(tasks); - } - catch (AggregateException ae) - { - Console.WriteLine("One or more exceptions occurred: "); - foreach (var ex in ae.Flatten().InnerExceptions) - Console.WriteLine($" {ex.Message}"); - } - - Console.WriteLine("Status of completed tasks:"); - foreach (var t in tasks) - Console.WriteLine($" Task #{t.Id}: {t.Status}"); - } -} -// The example displays the following output: -// Status of completed tasks: -// Task #2: RanToCompletion -// Task #1: RanToCompletion -// Task #3: RanToCompletion -// Task #4: RanToCompletion -// Task #6: RanToCompletion -// Task #5: RanToCompletion -// Task #7: RanToCompletion -// Task #8: RanToCompletion -// Task #9: RanToCompletion -// Task #10: RanToCompletion -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll2.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll2.cs deleted file mode 100644 index be60e6442c03d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WaitAll2.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -public class Example6 -{ - public static void Main() - { - // Create a cancellation token and cancel it. - var source1 = new CancellationTokenSource(); - var token1 = source1.Token; - source1.Cancel(); - // Create a cancellation token for later cancellation. - var source2 = new CancellationTokenSource(); - var token2 = source2.Token; - - // Create a series of tasks that will complete, be cancelled, - // timeout, or throw an exception. - Task[] tasks = new Task[12]; - for (int i = 0; i < 12; i++) - { - switch (i % 4) - { - // Task should run to completion. - case 0: - tasks[i] = Task.Run(() => Thread.Sleep(2000)); - break; - // Task should be set to canceled state. - case 1: - tasks[i] = Task.Run(() => Thread.Sleep(2000), - token1); - break; - case 2: - // Task should throw an exception. - tasks[i] = Task.Run(() => { throw new NotSupportedException(); }); - break; - case 3: - // Task should examine cancellation token. - tasks[i] = Task.Run(() => - { - Thread.Sleep(2000); - if (token2.IsCancellationRequested) - token2.ThrowIfCancellationRequested(); - Thread.Sleep(500); - }, token2); - break; - } - } - Thread.Sleep(250); - source2.Cancel(); - - try - { - Task.WaitAll(tasks); - } - catch (AggregateException ae) - { - Console.WriteLine("One or more exceptions occurred:"); - foreach (var ex in ae.InnerExceptions) - Console.WriteLine($" {ex.GetType().Name}: {ex.Message}"); - } - - Console.WriteLine("\nStatus of tasks:"); - foreach (var t in tasks) - { - Console.WriteLine($" Task #{t.Id}: {t.Status}"); - if (t.Exception != null) - { - foreach (var ex in t.Exception.InnerExceptions) - Console.WriteLine($" {ex.GetType().Name}: {ex.Message}"); - } - } - } -} -// The example displays output like the following: -// One or more exceptions occurred: -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// -// Status of tasks: -// Task #13: RanToCompletion -// Task #1: Canceled -// Task #3: Faulted -// NotSupportedException: Specified method is not supported. -// Task #8: Canceled -// Task #14: RanToCompletion -// Task #4: Canceled -// Task #6: Faulted -// NotSupportedException: Specified method is not supported. -// Task #7: Canceled -// Task #15: RanToCompletion -// Task #9: Canceled -// Task #11: Faulted -// NotSupportedException: Specified method is not supported. -// Task #12: Canceled -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WhenAny1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WhenAny1.cs deleted file mode 100644 index 18756dc00096f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/WhenAny1.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -public class Example4 -{ - public static void Main() - { - var tasks = new Task[3]; - var rnd = new Random(); - for (int ctr = 0; ctr <= 2; ctr++) - tasks[ctr] = Task.Run(() => Thread.Sleep(rnd.Next(500, 3000))); - - try - { - int index = Task.WaitAny(tasks); - Console.WriteLine($"Task #{tasks[index].Id} completed first.\n"); - Console.WriteLine("Status of all tasks:"); - foreach (var t in tasks) - Console.WriteLine($" Task #{t.Id}: {t.Status}"); - } - catch (AggregateException) - { - Console.WriteLine("An exception occurred."); - } - } -} -// The example displays output like the following: -// Task #1 completed first. -// -// Status of all tasks: -// Task #3: Running -// Task #1: RanToCompletion -// Task #4: Running -// - - - - -// // Wait for first task to complete. -// Task[] tasks2 = new Task[3]; -// -// // Try three different approaches to the problem. Take the first one. -// tasks2[0] = Task.Factory.StartNew(() => TrySolution1()); -// tasks2[1] = Task.Factory.StartNew(() => TrySolution2()); -// tasks2[2] = Task.Factory.StartNew(() => TrySolution3()); -// -// -// int index = Task.WaitAny(tasks2); -// double d = tasks2[index].Result; -// Console.WriteLine($"task[{index}] completed first with result of {d}."); -// -// Console.ReadKey(); -// } -// -// -// static void DoSomeWork(int val) -// { -// // Pretend to do something. -// Thread.SpinWait(val); -// } -// -// static double TrySolution1() -// { -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// return DateTime.Now.Millisecond; -// } -// static double TrySolution2() -// { -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// return DateTime.Now.Millisecond; -// } -// static double TrySolution3() -// { -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// Thread.SpinWait(1000000); -// return DateTime.Now.Millisecond; -// } -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/run1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/run1.cs deleted file mode 100644 index 80d36c6e2ea3f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/run1.cs +++ /dev/null @@ -1,20 +0,0 @@ -// -using System; -using System.Threading.Tasks; - -public class Example -{ - public static async Task Main() - { - await Task.Run( () => { - // Just loop. - int ctr = 0; - for (ctr = 0; ctr <= 1000000; ctr++) - {} - Console.WriteLine($"Finished {ctr} loop iterations"); - } ); - } -} -// The example displays the following output: -// Finished 1000001 loop iterations -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew.cs deleted file mode 100644 index f1d4917273135..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -using System; -using System.Threading; -using System.Threading.Tasks; - -class Example1 -{ - static void Main() - { - Action action = (object obj) => - { - Console.WriteLine("Task={0}, obj={1}, Thread={2}", - Task.CurrentId, obj, - Thread.CurrentThread.ManagedThreadId); - }; - - // Create a task but do not start it. - Task t1 = new Task(action, "alpha"); - - // Construct a started task - Task t2 = Task.Factory.StartNew(action, "beta"); - // Block the main thread to demonstrate that t2 is executing - t2.Wait(); - - // Launch t1 - t1.Start(); - Console.WriteLine($"t1 has been launched. (Main Thread={Thread.CurrentThread.ManagedThreadId})"); - // Wait for the task to finish. - t1.Wait(); - - // Construct a started task using Task.Run. - String taskData = "delta"; - Task t3 = Task.Run(() => - { - Console.WriteLine("Task={0}, obj={1}, Thread={2}", - Task.CurrentId, taskData, - Thread.CurrentThread.ManagedThreadId); - }); - // Wait for the task to finish. - t3.Wait(); - - // Construct an unstarted task - Task t4 = new Task(action, "gamma"); - // Run it synchronously - t4.RunSynchronously(); - // Although the task was run synchronously, it is a good practice - // to wait for it in the event exceptions were thrown by the task. - t4.Wait(); - } -} -// The example displays output like the following: -// Task=1, obj=beta, Thread=3 -// t1 has been launched. (Main Thread=1) -// Task=2, obj=alpha, Thread=4 -// Task=3, obj=delta, Thread=3 -// Task=4, obj=gamma, Thread=1 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew1.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew1.cs deleted file mode 100644 index 2c39595bad6b1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/csharp/startnew1.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -using System; -using System.Threading.Tasks; - -public class Example2 -{ - public static void Main() - { - Task t = Task.Factory.StartNew(() => - { - // Just loop. - int ctr = 0; - for (ctr = 0; ctr <= 1000000; ctr++) - { } - Console.WriteLine($"Finished {ctr} loop iterations"); - }); - t.Wait(); - } -} -// The example displays the following output: -// Finished 1000001 loop iterations -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait1.fs deleted file mode 100644 index 82303ddd26464..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait1.fs +++ /dev/null @@ -1,22 +0,0 @@ -module Wait1 -// -open System -open System.Threading -open System.Threading.Tasks - -let rand = Random() - -// Wait on a single task with no timeout specified. -let taskA = Task.Run(fun () -> Thread.Sleep 2000) -printfn $"taskA Status: {taskA.Status}" -try - taskA.Wait() - printfn $"taskA Status: {taskA.Status}" - -with :? AggregateException -> - printfn "Exception in taskA." - -// The example displays output like the following: -// taskA Status: WaitingToRun -// taskA Status: RanToCompletion -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait2.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait2.fs deleted file mode 100644 index 72bbb825d56ee..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/Wait2.fs +++ /dev/null @@ -1,25 +0,0 @@ -module Wait2 -// -open System -open System.Threading -open System.Threading.Tasks - -// Wait on a single task with a timeout specified. -let taskA = Task.Run(fun () -> Thread.Sleep 2000) - -try - taskA.Wait 1000 |> ignore // Wait for 1 second. - let completed = taskA.IsCompleted - printfn $"Task A completed: {completed}, Status: {taskA.Status}" - - if not completed then - printfn "Timed out before task A completed." - -with :? AggregateException -> - printfn "Exception in taskA." - - -// The example displays output like the following: -// Task A completed: False, Status: Running -// Timed out before task A completed. -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll1.fs deleted file mode 100644 index 3f0e0c0c05681..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll1.fs +++ /dev/null @@ -1,38 +0,0 @@ -module WaitAll1 -// -open System -open System.Threading -open System.Threading.Tasks - -// Wait for all tasks to complete. -let tasks = - [| for _ = 0 to 9 do - Task.Run(fun () -> Thread.Sleep 2000) |] - -try - Task.WaitAll tasks - -with :? AggregateException as ae -> - printfn "One or more exceptions occurred: " - - for ex in ae.Flatten().InnerExceptions do - printfn $" {ex.Message}" - -printfn "Status of completed tasks:" - -for t in tasks do - printfn $" Task #{t.Id}: {t.Status}" - -// The example displays the following output: -// Status of completed tasks: -// Task #2: RanToCompletion -// Task #1: RanToCompletion -// Task #3: RanToCompletion -// Task #4: RanToCompletion -// Task #6: RanToCompletion -// Task #5: RanToCompletion -// Task #7: RanToCompletion -// Task #8: RanToCompletion -// Task #9: RanToCompletion -// Task #10: RanToCompletion -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll2.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll2.fs deleted file mode 100644 index 9d466754397e1..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WaitAll2.fs +++ /dev/null @@ -1,86 +0,0 @@ -module WaitAll2 -// -open System -open System.Threading -open System.Threading.Tasks - -// Create a cancellation token and cancel it. -let source1 = new CancellationTokenSource() -let token1 = source1.Token -source1.Cancel() -// Create a cancellation token for later cancellation. -let source2 = new CancellationTokenSource() -let token2 = source2.Token - -// Create a series of tasks that will complete, be cancelled, -// timeout, or throw an exception. -let tasks = - [| for i in 0..11 do - match i % 4 with - // Task should run to completion. - | 0 -> Task.Run(fun () -> Thread.Sleep 2000) - // Task should be set to canceled state. - | 1 -> Task.Run(fun () -> Thread.Sleep 2000, token1) - // Task should throw an exception. - | 2 -> Task.Run(fun () -> NotSupportedException()) - // Task should examine cancellation token. - | _ -> - Task.Run(fun () -> - Thread.Sleep 2000 - - if token2.IsCancellationRequested then - token2.ThrowIfCancellationRequested() - - Thread.Sleep 500, token2) |] - - -Thread.Sleep 250 -source2.Cancel() - -try - Task.WaitAll tasks - -with :? AggregateException as ae -> - printfn "One or more exceptions occurred:" - - for ex in ae.InnerExceptions do - printfn $" {ex.GetType().Name}: {ex.Message}" - -printfn "\nStatus of tasks:" - -for t in tasks do - printfn $" Task #{t.Id}: {t.Status}" - - if isNull t.Exception |> not then - for ex in t.Exception.InnerExceptions do - printfn $" {ex.GetType().Name}: {ex.Message}" - -// The example displays output like the following: -// One or more exceptions occurred: -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// TaskCanceledException: A task was canceled. -// NotSupportedException: Specified method is not supported. -// TaskCanceledException: A task was canceled. -// -// Status of tasks: -// Task #13: RanToCompletion -// Task #1: Canceled -// Task #3: Faulted -// NotSupportedException: Specified method is not supported. -// Task #8: Canceled -// Task #14: RanToCompletion -// Task #4: Canceled -// Task #6: Faulted -// NotSupportedException: Specified method is not supported. -// Task #7: Canceled -// Task #15: RanToCompletion -// Task #9: Canceled -// Task #11: Faulted -// NotSupportedException: Specified method is not supported. -// Task #12: Canceled -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WhenAny1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WhenAny1.fs deleted file mode 100644 index 0909a2ca968e0..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/WhenAny1.fs +++ /dev/null @@ -1,81 +0,0 @@ -module WhenAny1 -// -open System -open System.Threading -open System.Threading.Tasks - -let rnd = new Random() - -let tasks = - [| for _ = 0 to 2 do - Task.Run(fun () -> rnd.Next(500, 3000) |> Thread.Sleep) |] - -try - let index = Task.WaitAny tasks - printfn $"Task #{tasks[index].Id} completed first.\n" - printfn "Status of all tasks:" - - for t in tasks do - printfn $" Task #{t.Id}: {t.Status}" - -with :? AggregateException -> - printfn "An exception occurred." - -// The example displays output like the following: -// Task #1 completed first. -// -// Status of all tasks: -// Task #3: Running -// Task #1: RanToCompletion -// Task #4: Running -// - - - - -// // Wait for first task to complete. -// Task[] tasks2 = new Task[3]; -// -// // Try three different approaches to the problem. Take the first one. -// tasks2[0] = Task.Factory.StartNew(() => TrySolution1()); -// tasks2[1] = Task.Factory.StartNew(() => TrySolution2()); -// tasks2[2] = Task.Factory.StartNew(() => TrySolution3()); -// -// -// int index = Task.WaitAny(tasks2); -// double d = tasks2[index].Result; -// Console.WriteLine("task[{0}] completed first with result of {1}.", index, d); -// -// Console.ReadKey(); -// -// -// -// static void DoSomeWork(int val) -// -// // Pretend to do something. -// Thread.SpinWait(val); -// -// -// static double TrySolution1() -// -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// return DateTime.Now.Millisecond; -// -// static double TrySolution2() -// -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// return DateTime.Now.Millisecond; -// -// static double TrySolution3() -// -// int i = rand.Next(1000000); -// // Simulate work by spinning -// Thread.SpinWait(i); -// Thread.SpinWait(1000000); -// return DateTime.Now.Millisecond; -// -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/run1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/run1.fs deleted file mode 100644 index 1e986c10583f5..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/run1.fs +++ /dev/null @@ -1,17 +0,0 @@ -module run1 -// -open System.Threading.Tasks - -let main = - task { - do! - Task.Run(fun () -> - for i = 0 to 1000000 do - printfn $"Finished {i} loop iterations") - } - -main.Wait() - -// The example displays the following output: -// Finished 1000001 loop iterations -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew.fs deleted file mode 100644 index 3c6d07303c0cf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew.fs +++ /dev/null @@ -1,46 +0,0 @@ -module startnew -// -open System.Threading -open System.Threading.Tasks - -let action = - fun (obj: obj) -> printfn $"Task={Task.CurrentId}, obj={obj}, Thread={Thread.CurrentThread.ManagedThreadId}" - -// Create a task but do not start it. -let t1 = new Task(action, "alpha") - -// Construct a started task -let t2 = Task.Factory.StartNew(action, "beta") -// Block the main thread to demonstrate that t2 is executing -t2.Wait() - -// Launch t1 -t1.Start() -printfn $"t1 has been launched. (Main Thread={Thread.CurrentThread.ManagedThreadId})" -// Wait for the task to finish. -t1.Wait() - -// Construct a started task using Task.Run. -let taskData = "delta" - -let t3 = - Task.Run(fun () -> printfn $"Task={Task.CurrentId}, obj={taskData}, Thread={Thread.CurrentThread.ManagedThreadId}") -// Wait for the task to finish. -t3.Wait() - -// Construct an unstarted task -let t4 = new Task(action, "gamma") -// Run it synchronously -t4.RunSynchronously() -// Although the task was run synchronously, it is a good practice -// to wait for it in the event exceptions were thrown by the task. -t4.Wait() - - -// The example displays output like the following: -// Task=1, obj=beta, Thread=3 -// t1 has been launched. (Main Thread=1) -// Task=2, obj=alpha, Thread=4 -// Task=3, obj=delta, Thread=3 -// Task=4, obj=gamma, Thread=1 -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew1.fs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew1.fs deleted file mode 100644 index a66aff79a9db8..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/fsharp/startnew1.fs +++ /dev/null @@ -1,16 +0,0 @@ -module startnew1 -// -open System.Threading.Tasks - -let t = - Task.Factory.StartNew(fun () -> - // Just loop. - for i = 0 to 1000000 do - printfn $"Finished {i} loop iterations") - -t.Wait() - - -// The example displays the following output: -// Finished 1000001 loop iterations -// diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Project.vbproj b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Project.vbproj deleted file mode 100644 index 874c98f34776c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Project.vbproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Library - net10.0 - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait1.vb deleted file mode 100644 index 914b7bce249cf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait1.vb +++ /dev/null @@ -1,24 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading -Imports System.Threading.Tasks - -Module Example4 - Public Sub Main() - ' Wait on a single task with no timeout specified. - Dim taskA = Task.Run(Sub() Thread.Sleep(2000)) - Console.WriteLine("taskA Status: {0}", taskA.Status) - Try - taskA.Wait() - Console.WriteLine("taskA Status: {0}", taskA.Status) - Catch e As AggregateException - Console.WriteLine("Exception in taskA.") - End Try - End Sub -End Module -' The example displays output like the following: -' taskA Status: WaitingToRun -' taskA Status: RanToCompletion -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait2.vb deleted file mode 100644 index 5831bede59b52..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/Wait2.vb +++ /dev/null @@ -1,28 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading -Imports System.Threading.Tasks - -Module Example5 - Public Sub Main() - ' Wait on a single task with a timeout specified. - Dim taskA As Task = Task.Run(Sub() Thread.Sleep(2000)) - Try - taskA.Wait(1000) ' Wait for 1 second. - Dim completed As Boolean = taskA.IsCompleted - Console.WriteLine("Task.Completed: {0}, Status: {1}", - completed, taskA.Status) - If Not completed Then - Console.WriteLine("Timed out before task A completed.") - End If - Catch e As AggregateException - Console.WriteLine("Exception in taskA.") - End Try - End Sub -End Module -' The example displays the following output: -' Task A completed: False, Status: Running -' Timed out before task A completed. -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll1.vb deleted file mode 100644 index fc512ca31a2ae..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll1.vb +++ /dev/null @@ -1,42 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading -Imports System.Threading.Tasks - -Module Example6 - Public Sub Main() - ' Wait for all tasks to complete. - Dim tasks(9) As Task - For i As Integer = 0 To 9 - tasks(i) = Task.Run(Sub() Thread.Sleep(2000)) - Next - Try - Task.WaitAll(tasks) - Catch ae As AggregateException - Console.WriteLine("One or more exceptions occurred: ") - For Each ex In ae.Flatten().InnerExceptions - Console.WriteLine(" {0}", ex.Message) - Next - End Try - - Console.WriteLine("Status of completed tasks:") - For Each t In tasks - Console.WriteLine(" Task #{0}: {1}", t.Id, t.Status) - Next - End Sub -End Module -' The example displays the following output: -' Status of completed tasks: -' Task #2: RanToCompletion -' Task #1: RanToCompletion -' Task #3: RanToCompletion -' Task #4: RanToCompletion -' Task #6: RanToCompletion -' Task #5: RanToCompletion -' Task #7: RanToCompletion -' Task #8: RanToCompletion -' Task #9: RanToCompletion -' Task #10: RanToCompletion -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll2.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll2.vb deleted file mode 100644 index 91cea251e4b3d..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAll2.vb +++ /dev/null @@ -1,98 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading -Imports System.Threading.Tasks - -Module Example7 - Public Sub Main() - ' Create a cancellation token and cancel it. - Dim source1 As New CancellationTokenSource() - Dim token1 As CancellationToken = source1.Token - source1.Cancel() - ' Create a cancellation token for later cancellation. - Dim source2 As New CancellationTokenSource() - Dim token2 As CancellationToken = source2.Token - - ' Create a series of tasks that will complete, be cancelled, - ' timeout, or throw an exception. - Dim tasks(11) As Task - For i As Integer = 0 To 11 - Select Case i Mod 4 - ' Task should run to completion. - Case 0 - tasks(i) = Task.Run(Sub() Thread.Sleep(2000)) - ' Task should be set to canceled state. - Case 1 - tasks(i) = Task.Run(Sub() Thread.Sleep(2000), token1) - Case 2 - ' Task should throw an exception. - tasks(i) = Task.Run(Sub() - Throw New NotSupportedException() - End Sub) - Case 3 - ' Task should examine cancellation token. - tasks(i) = Task.Run(Sub() - Thread.Sleep(2000) - If token2.IsCancellationRequested Then - token2.ThrowIfCancellationRequested() - End If - Thread.Sleep(500) - End Sub, token2) - End Select - Next - Thread.Sleep(250) - source2.Cancel() - - Try - Task.WaitAll(tasks) - Catch ae As AggregateException - Console.WriteLine("One or more exceptions occurred:") - For Each ex In ae.InnerExceptions - Console.WriteLine(" {0}: {1}", ex.GetType().Name, ex.Message) - Next - End Try - Console.WriteLine() - - Console.WriteLine("Status of tasks:") - For Each t In tasks - Console.WriteLine(" Task #{0}: {1}", t.Id, t.Status) - If t.Exception IsNot Nothing Then - For Each ex In t.Exception.InnerExceptions - Console.WriteLine(" {0}: {1}", ex.GetType().Name, - ex.Message) - Next - End If - Next - End Sub -End Module -' The example displays output like the following: -' One or more exceptions occurred: -' TaskCanceledException: A task was canceled. -' NotSupportedException: Specified method is not supported. -' TaskCanceledException: A task was canceled. -' TaskCanceledException: A task was canceled. -' NotSupportedException: Specified method is not supported. -' TaskCanceledException: A task was canceled. -' TaskCanceledException: A task was canceled. -' NotSupportedException: Specified method is not supported. -' TaskCanceledException: A task was canceled. -' -' Status of tasks: -' Task #13: RanToCompletion -' Task #1: Canceled -' Task #3: Faulted -' NotSupportedException: Specified method is not supported. -' Task #8: Canceled -' Task #14: RanToCompletion -' Task #4: Canceled -' Task #6: Faulted -' NotSupportedException: Specified method is not supported. -' Task #7: Canceled -' Task #15: RanToCompletion -' Task #9: Canceled -' Task #11: Faulted -' NotSupportedException: Specified method is not supported. -' Task #12: Canceled -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAny1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAny1.vb deleted file mode 100644 index 6efb896788c6c..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/WaitAny1.vb +++ /dev/null @@ -1,35 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading - -Module Example8 - Public Sub Main() - Dim tasks(2) As Task - Dim rnd As New Random() - For ctr As Integer = 0 To 2 - tasks(ctr) = Task.Run(Sub() Thread.Sleep(rnd.Next(500, 3000))) - Next - - Try - Dim index As Integer = Task.WaitAny(tasks) - Console.WriteLine("Task #{0} completed first.", tasks(index).Id) - Console.WriteLine() - Console.WriteLine("Status of all tasks:") - For Each t In tasks - Console.WriteLine(" Task #{0}: {1}", t.Id, t.Status) - Next - Catch e As AggregateException - Console.WriteLine("An exception occurred.") - End Try - End Sub -End Module -' The example displays output like the following: -' Task #1 completed first. -' -' Status of all tasks: -' Task #3: Running -' Task #1: RanToCompletion -' Task #4: Running -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/run1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/run1.vb deleted file mode 100644 index 1c5ed25f06296..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/run1.vb +++ /dev/null @@ -1,22 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading.Tasks - -Module Example1 - Public Sub Main() - Dim t As Task = Task.Run(Sub() - ' Just loop. - Dim ctr As Integer = 0 - For ctr = 0 To 1000000 - Next - Console.WriteLine("Finished {0} loop iterations", - ctr) - End Sub) - t.Wait() - End Sub -End Module -' The example displays the following output: -' Finished 1000001 loop iterations -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew.vb deleted file mode 100644 index 855e0f8297b08..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew.vb +++ /dev/null @@ -1,54 +0,0 @@ -' -Imports System.Threading -Imports System.Threading.Tasks - -Module Example2 - Public Sub Main() - Dim action As Action(Of Object) = - Sub(obj As Object) - Console.WriteLine("Task={0}, obj={1}, Thread={2}", - Task.CurrentId, obj, - Thread.CurrentThread.ManagedThreadId) - End Sub - - ' Construct an unstarted task - Dim t1 As New Task(action, "alpha") - - ' Construct a started task - Dim t2 As Task = Task.Factory.StartNew(action, "beta") - ' Block the main thread to demonstrate that t2 is executing - t2.Wait() - - ' Launch t1 - t1.Start() - Console.WriteLine("t1 has been launched. (Main Thread={0})", - Thread.CurrentThread.ManagedThreadId) - ' Wait for the task to finish. - t1.Wait() - - ' Construct a started task using Task.Run. - Dim taskData As String = "delta" - Dim t3 As Task = Task.Run(Sub() - Console.WriteLine("Task={0}, obj={1}, Thread={2}", - Task.CurrentId, taskData, - Thread.CurrentThread.ManagedThreadId) - End Sub) - ' Wait for the task to finish. - t3.Wait() - - ' Construct an unstarted task - Dim t4 As New Task(action, "gamma") - ' Run it synchronously - t4.RunSynchronously() - ' Although the task was run synchronously, it is a good practice - ' to wait for it in the event exceptions were thrown by the task. - t4.Wait() - End Sub -End Module -' The example displays output like the following: -' Task=1, obj=beta, Thread=3 -' t1 has been launched. (Main Thread=1) -' Task=2, obj=alpha, Thread=3 -' Task=3, obj=delta, Thread=3 -' Task=4, obj=gamma, Thread=1 -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew1.vb b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew1.vb deleted file mode 100644 index c8653513f1faf..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/Task/Overview/vb/startnew1.vb +++ /dev/null @@ -1,22 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -' -Imports System.Threading.Tasks - -Module Example3 - Public Sub Main() - Dim t As Task = Task.Factory.StartNew(Sub() - ' Just loop. - Dim ctr As Integer = 0 - For ctr = 0 To 1000000 - Next - Console.WriteLine("Finished {0} loop iterations", - ctr) - End Sub) - t.Wait() - End Sub -End Module -' The example displays the following output: -' Finished 1000001 loop iterations -' diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/Project.csproj b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/Project.csproj deleted file mode 100644 index 2732086bb1e6e..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/Project.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Exe - net10.0-windows - true - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.config b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.config deleted file mode 100644 index 3e0e37cfc8c7a..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml deleted file mode 100644 index 4160208d4a04f..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml.cs b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml.cs deleted file mode 100644 index d4bf55202f127..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/app.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace WPF_CS1 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/mainwindow.xaml b/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/mainwindow.xaml deleted file mode 100644 index 299b19375b548..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System.Threading.Tasks/TaskScheduler/FromCurrentSynchronizationContext/csharp/mainwindow.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - -