Skip to content

Commit 652bb96

Browse files
authored
Consolidate interpolated string tutorials (#46013)
* Consolidate interpolated string tutorials There were three very similar tutorials on interpolated strings. Combine them into one article. Fixes #46012 This is worth doing regardless of the outcome of the discussion regarding the new warnings. * warnings, part 1 * fix warnings * fix warnings and proofread * one more bit of warnings
1 parent 673a3f8 commit 652bb96

File tree

9 files changed

+65
-291
lines changed

9 files changed

+65
-291
lines changed

.openpublishing.redirection.csharp.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4042,12 +4042,12 @@
40424042
},
40434043
{
40444044
"source_path_from_root": "/docs/csharp/quick-starts/interpolated-strings-local.md",
4045-
"redirect_url": "/dotnet/csharp/tutorials/exploration/interpolated-strings-local",
4046-
"redirect_document_id": true
4045+
"redirect_url": "/dotnet/csharp/tutorials/string-interpolation"
40474046
},
40484047
{
4049-
"source_path_from_root": "/docs/csharp/quick-starts/interpolated-strings.md",
4050-
"redirect_url": "/dotnet/csharp/tutorials/exploration/interpolated-strings"
4048+
"source_path_from_root": "/docs/csharp/quick-starts/interpolated-strings.yml",
4049+
"redirect_url": "/dotnet/csharp/tutorials/string-interpolation",
4050+
"redirect_document_id": true
40514051
},
40524052
{
40534053
"source_path_from_root": "/docs/csharp/quick-starts/introduction-to-classes.md",
@@ -4060,7 +4060,7 @@
40604060
},
40614061
{
40624062
"source_path_from_root": "/docs/csharp/quick-starts/local-environment.md",
4063-
"redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials",
4063+
"redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials/",
40644064
"redirect_document_id": true
40654065
},
40664066
{
@@ -4208,6 +4208,14 @@
42084208
"source_path_from_root": "/docs/csharp/tutorials/exploration/top-level-statements.md",
42094209
"redirect_url": "/dotnet/csharp/tutorials/top-level-statements"
42104210
},
4211+
{
4212+
"source_path_from_root": "/docs/csharp/tutorials/exploration/interpolated-strings-local.md",
4213+
"redirect_url": "/dotnet/csharp/tutorials/string-interpolation"
4214+
},
4215+
{
4216+
"source_path_from_root": "/docs/csharp/tutorials/exploration/interpolated-strings.yml",
4217+
"redirect_url": "/dotnet/csharp/tutorials/string-interpolation"
4218+
},
42114219
{
42124220
"source_path_from_root": "/docs/csharp/tutorials/generate-consume-asynchronous-stream.md",
42134221
"redirect_url": "/dotnet/csharp/asynchronous-programming/generate-consume-asynchronous-stream"
@@ -4242,11 +4250,11 @@
42424250
},
42434251
{
42444252
"source_path_from_root": "/docs/csharp/tutorials/intro-to-csharp/interpolated-strings-local.md",
4245-
"redirect_url": "/dotnet/csharp/tutorials/exploration/interpolated-strings-local"
4253+
"redirect_url": "/dotnet/csharp/tutorials/interpolated-strings"
42464254
},
42474255
{
42484256
"source_path_from_root": "/docs/csharp/tutorials/intro-to-csharp/interpolated-strings.yml",
4249-
"redirect_url": "/dotnet/csharp/tutorials/exploration/interpolated-strings"
4257+
"redirect_url": "/dotnet/csharp/tutorials/interpolated-strings"
42504258
},
42514259
{
42524260
"source_path_from_root": "/docs/csharp/tutorials/intro-to-csharp/introduction-to-classes.md",

docs/csharp/language-reference/tokens/interpolated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ For more information about custom formatting, see the [Custom formatting with IC
8888

8989
## Other resources
9090

91-
If you're new to string interpolation, see the [String interpolation in C#](../../tutorials/exploration/interpolated-strings.yml) interactive tutorial. You can also check another [String interpolation in C#](../../tutorials/string-interpolation.md) tutorial. That tutorial demonstrates how to use interpolated strings to produce formatted strings.
91+
If you're new to string interpolation, see the [String interpolation in C#](../../tutorials/string-interpolation.md) interactive tutorial. That tutorial demonstrates how to use interpolated strings to produce formatted strings.
9292

9393
## Compilation of interpolated strings
9494

docs/csharp/programming-guide/strings/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ A format string is a string whose contents are determined dynamically at run tim
106106

107107
### String interpolation
108108

109-
You declare [*Interpolated strings*](../../language-reference/tokens/interpolated.md) with the `$` special character. An interpolated string includes interpolated expressions in braces. If you're new to string interpolation, see the [String interpolation - C# interactive tutorial](../../tutorials/exploration/interpolated-strings.yml) for a quick overview.
109+
You declare [*Interpolated strings*](../../language-reference/tokens/interpolated.md) with the `$` special character. An interpolated string includes interpolated expressions in braces. If you're new to string interpolation, see the [String interpolation - C# tutorial](../../tutorials/string-interpolation.md) for several examples.
110110

111111
Use string interpolation to improve the readability and maintainability of your code. String interpolation achieves the same results as the `String.Format` method, but is easier to use and improves inline clarity.
112112

docs/csharp/toc.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,9 @@ items:
186186
href: tutorials/ranges-indexes.md
187187
- name: Work with nullable reference types
188188
href: tutorials/nullable-reference-types.md
189-
- name: Explore string interpolation - interactive
190-
href: tutorials/exploration/interpolated-strings.yml
191-
- name: Explore string interpolation - in your environment
192-
href: tutorials/exploration/interpolated-strings-local.md
193189
- name: Explore patterns in objects
194190
href: tutorials/patterns-objects.md
195-
- name: Advanced scenarios for string Interpolation
191+
- name: String interpolation
196192
href: tutorials/string-interpolation.md
197193
- name: Console Application
198194
href: tutorials/console-teleprompter.md

docs/csharp/tutorials/exploration/interpolated-strings-local.md

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)