Skip to content

Commit 45734b7

Browse files
BillWagnerCopilotmeaghanlewis
authored
Modernize the Get Started content (#51565)
* Complete phase 1 * Finish step 3. * Finish step 4 Phase 2 is now complete. * Finish step 5. * Content edit * Continue to step 6. * Finish step 7. * copy edit * Complete step 8 * copy edit. * Finish step 9 * copy edit * Step 10 for the plan. * copy edit * update tutorial * Refresh first tutorial. * refresh numbers tutorial * copyedit * Refresh this article. * copy edit on tuples-and-types * copy edit * refresh this tutorial * copy edit * refresh patterns tutorials * Finish the final tutorial * Update links and checks * fix warnings * Add links to Aspire * interim checkin. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * General Copyedit. * small nits * Apply suggestion from @BillWagner * Apply suggestions from code review Co-authored-by: Meaghan Osagie (Lewis) <moneikmarie@gmail.com> * global replace terms Globally replace "file-based program" with "file-based app" --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Meaghan Osagie (Lewis) <moneikmarie@gmail.com>
1 parent 9814883 commit 45734b7

File tree

20 files changed

+601
-185
lines changed

20 files changed

+601
-185
lines changed

docs/csharp/fundamentals/tutorials/file-based-programs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In this tutorial, you:
1414

1515
> [!div class="checklist"]
1616
>
17-
> * Create a file-based program.
17+
> * Create a file-based app.
1818
> * Add Unix shebang (`#!`) support.
1919
> * Read command line arguments.
2020
> * Handle standard input.
@@ -23,15 +23,15 @@ In this tutorial, you:
2323
> * Use parsed command line results.
2424
> * Test the final application.
2525
26-
You build a file-based program that writes text as ASCII art. The app is contained in a single file, uses NuGet packages, and implements core features.
26+
You build a file-based app that writes text as ASCII art. The app is contained in a single file, uses NuGet packages, and implements core features.
2727

2828
## Prerequisites
2929

3030
- The .NET 10 SDK. Download it from the [.NET download site](https://dotnet.microsoft.com/download/dotnet/10.0).
3131
- Visual Studio Code. Download it from the [Visual Studio Code homepage](https://code.visualstudio.com/Download).
3232
- (Optional) The C# DevKit extension for Visual Studio Code. Download it from the [Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit).
3333

34-
## Create a file-based program
34+
## Create a file-based app
3535

3636
1. Open Visual Studio Code and create a new file named `AsciiArt.cs`. Enter the following text:
3737

@@ -61,7 +61,7 @@ AsciiArt succeeded (7.3s) → Library/Application Support/dotnet/runfile/AsciiAr
6161

6262
That output tells you where the temporary files and build outputs are placed. Throughout this tutorial, anytime you edit the source file, the `dotnet` host updates the executable before it runs.
6363

64-
File-based apps are regular C# programs. The only limitation is that you must write them in one source file. You can use top-level statements or a classic `Main` method as an entry point. You can declare any types: classes, interfaces, and structs. You can structure the algorithms in a file-based program the same as you would in any C# program. You can even declare multiple namespaces to organize your code. If you find a file-based program is growing too large for a single file, you can convert it to a project-based program and split the source into multiple files. File-based apps are a great prototyping tool. You can start experimenting with minimal overhead to prove concepts and build algorithms.
64+
File-based apps are regular C# programs. The only limitation is that you must write them in one source file. You can use top-level statements or a classic `Main` method as an entry point. You can declare any types: classes, interfaces, and structs. You can structure the algorithms in a file-based app the same as you would in any C# program. You can even declare multiple namespaces to organize your code. If you find a file-based app is growing too large for a single file, you can convert it to a project-based program and split the source into multiple files. File-based apps are a great prototyping tool. You can start experimenting with minimal overhead to prove concepts and build algorithms.
6565

6666
## Unix shebang (`#!`) support
6767

@@ -169,7 +169,7 @@ Now your program can accept either command line arguments or standard input.
169169

170170
## Write ASCII art output
171171

172-
Next, add a package that supports ASCII art, [Colorful.Console](https://www.nuget.org/packages/Colorful.Console). To add a package to a file-based program, use the `#:package` directive.
172+
Next, add a package that supports ASCII art, [Colorful.Console](https://www.nuget.org/packages/Colorful.Console). To add a package to a file-based app, use the `#:package` directive.
173173

174174
1. Add the following directive after the `#!` directive in your `AsciiArt.cs` file:
175175

@@ -268,7 +268,7 @@ Test the application by running several different commands. If you have trouble,
268268

269269
:::code language="csharp" source="./snippets/file-based-programs/AsciiArt":::
270270

271-
In this tutorial, you learned to build a file-based program, where you build the program in a single C# file. These programs don't use a project file, and can use the `#!` directive on Unix systems. Learners can create these programs after trying our [online tutorials](../../tour-of-csharp/tutorials/hello-world.md) and before building larger project-based apps. File-based apps are also a great platform for command line utilities.
271+
In this tutorial, you learned to build a file-based app, where you build the program in a single C# file. These programs don't use a project file, and can use the `#!` directive on Unix systems. Learners can create these programs after trying our [online tutorials](../../tour-of-csharp/tutorials/hello-world.md) and before building larger project-based apps. File-based apps are also a great platform for command line utilities.
272272

273273
## Related content
274274

docs/csharp/fundamentals/tutorials/snippets/file-based-programs/AsciiArt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Argument<string[]> messagesArgument = new("Messages")
1717
Description = "Text to render."
1818
};
1919

20-
RootCommand rootCommand = new("Ascii Art file-based program sample");
20+
RootCommand rootCommand = new("Ascii Art file-based app sample");
2121

2222
rootCommand.Options.Add(delayOption);
2323
rootCommand.Arguments.Add(messagesArgument);

docs/csharp/fundamentals/tutorials/snippets/file-based-programs/AsciiArt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// </OptionArgument>
2727

2828
// <RootCommand>
29-
RootCommand rootCommand = new("Ascii Art file-based program sample");
29+
RootCommand rootCommand = new("Ascii Art file-based app sample");
3030

3131
rootCommand.Options.Add(delayOption);
3232
rootCommand.Arguments.Add(messagesArgument);

docs/csharp/index.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414
ms.topic: hub-page
1515
author: billwagner
1616
ms.author: wiwagn
17-
ms.date: 05/30/2025
17+
ms.date: 02/06/2026
1818

1919
# highlightedContent section (Optional; Remove if not applicable.)
2020
# Maximum of 8 items
@@ -59,12 +59,12 @@ productDirectory:
5959
links:
6060
- url: ./tour-of-csharp/overview.md
6161
text: A tour of C#
62+
- url: ./tour-of-csharp/what-you-can-build.md
63+
text: What you can build with C#
6264
- url: ./tour-of-csharp/tutorials/index.md
6365
text: Beginner C# tutorials
64-
- url: ./tour-of-csharp/tutorials/hello-world.md
65-
text: Try C# in your browser
66-
- url: ./fundamentals/program-structure/index.md
67-
text: "Inside a C# program"
66+
- url: ./tour-of-csharp/tips-for-java-developers.md
67+
text: "C# for Java developers"
6868
- url: https://aka.ms/dotnet/beginnervideos/learn/csharp
6969
text: "C# for beginners video series"
7070
- url: https://aka.ms/csharp-certification

docs/csharp/language-reference/compiler-messages/preprocessor-errors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ The compiler generates the following errors for incorrect use of preprocessor di
112112
- [**CS8996**](#invalid-preprocessor-directive-syntax): *Raw string literals are not allowed in preprocessor directives*
113113
- [**CS9028**](#line-and-file-directive-errors): *The #line span directive requires space before the first parenthesis, before the character offset, and before the file name*
114114
- [**CS9297**](#incorrect-use-of-file-based-apps-directives): *`#:` directives cannot be after first token in file*
115-
- [**CS9298**](#incorrect-use-of-file-based-apps-directives): *`#:` directives can be only used in file-based programs (`-features:FileBasedProgram`)*
115+
- [**CS9298**](#incorrect-use-of-file-based-apps-directives): *`#:` directives can be only used in file-based apps (`-features:FileBasedProgram`)*
116116
- [**CS9299**](#incorrect-use-of-file-based-apps-directives): *`#:` directives cannot be after `#if` directive*
117-
- [**CS9314**](#incorrect-use-of-file-based-apps-directives): *`#!` directives can be only used in scripts or file-based programs*
117+
- [**CS9314**](#incorrect-use-of-file-based-apps-directives): *`#!` directives can be only used in scripts or file-based apps*
118118

119119
## Invalid preprocessor directive syntax
120120

@@ -424,9 +424,9 @@ To fix these errors, ensure your `#line` directives and file-related preprocesso
424424
## Incorrect use of file-based apps directives
425425

426426
- **CS9297**: *`#:` directives cannot be after first token in file*
427-
- **CS9298**: *`#:` directives can be only used in file-based programs (`-features:FileBasedProgram`)*
427+
- **CS9298**: *`#:` directives can be only used in file-based apps (`-features:FileBasedProgram`)*
428428
- **CS9299**: *`#:` directives cannot be after `#if` directive*
429-
- **CS9314**: *`#!` directives can be only used in scripts or file-based programs*
429+
- **CS9314**: *`#!` directives can be only used in scripts or file-based apps*
430430

431431
These errors indicate that you used the `#:` directives for a file-based app incorrectly. You can learn more about the syntax for these directives in the article on [preprocessor directives](../preprocessor-directives.md#file-based-apps) in the section on file-based apps. Or, you can explore file based apps by following the [tutorial](../../fundamentals/tutorials/file-based-programs.md) on file-based apps.
432432

docs/csharp/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ items:
55
items:
66
- name: Tour of C#
77
href: tour-of-csharp/overview.md
8+
- name: What you can build
9+
href: tour-of-csharp/what-you-can-build.md
810
- name: Tutorials
911
items:
1012
- name: Choose your first lesson

docs/csharp/tour-of-csharp/index.yml

Lines changed: 32 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,42 @@
11
### YamlMime:Landing
22

33
title: "C# documentation"
4-
summary: "Learn how to write any application using the C# programming language on the .NET platform."
4+
summary: "Learn how to write any application using the C# programming language."
55

66
metadata:
77
title: "C# docs - get started, tutorials, reference."
8-
description: "Learn C# programming - for beginning developers, developers new to C#, and experienced C# / .NET developers"
8+
description: "Learn C# programming - for beginning developers, developers new to C#, and experienced C# developers"
99
ms.topic: landing-page # Required
10-
ms.date: 05/29/2025
10+
ms.date: 02/06/2026
1111

1212

1313
landingContent:
14-
- title: "Learn to program"
14+
- title: "Choose your path"
1515
linkLists:
1616
- linkListType: get-started
1717
links:
18-
- text: Learn C# | Tutorials, courses, videos, and more
19-
url: https://dotnet.microsoft.com/learn/csharp
20-
- text: Beginner C# tutorials in your browser
18+
- text: "New to programming? Start with beginner tutorials"
2119
url: ./tutorials/index.md
22-
- linkListType: video
23-
links:
20+
- text: "In-browser tutorial: Hello world"
21+
url: ./tutorials/hello-world.md
2422
- text: "C# beginner video series"
2523
url: https://aka.ms/dotnet/beginnervideos/youtube/csharp
26-
- linkListType: tutorial
24+
- linkListType: overview
2725
links:
28-
- text: "Self-guided tutorials"
29-
url: https://learn.microsoft.com/users/dotnet/collections/yz26f8y64n7k07?WT.mc_id=dotnet-35129-website
30-
- text: "In-browser tutorial"
31-
url: ./tutorials/hello-world.md
32-
- linkListType: reference
26+
- text: "Experienced developer? A tour of C#"
27+
url: ./overview.md
28+
- text: Learn C# for Java developers
29+
url: ./tips-for-java-developers.md
30+
- text: Learn C# for JavaScript developers
31+
url: ./tips-for-javascript-developers.md
32+
- text: Learn C# for Python developers
33+
url: ./tips-for-python-developers.md
34+
- linkListType: learn
3335
links:
34-
- text: "C# on Q&A"
35-
url: /answers/topics/dotnet-csharp.html
36-
- text: "Languages on .NET tech community forums"
37-
url: https://techcommunity.microsoft.com/t5/languages/bd-p/languages
38-
- text: "C# on Stack Overflow"
39-
url: https://stackoverflow.com/questions/tagged/c%23
40-
- text: "C# on Discord"
41-
url: https://aka.ms/csharp-discord
36+
- text: Foundational C# Certification
37+
url: https://aka.ms/csharp-certification
38+
- text: What you can build with C#
39+
url: ./what-you-can-build.md
4240

4341
- title: "Fundamentals"
4442
linkLists:
@@ -50,7 +48,7 @@ landingContent:
5048
url: ../fundamentals/program-structure/index.md
5149
- text: "C# highlights video series"
5250
url: https://youtube.com/playlist?list=PLdo4fOcmZ0oU3ZLx6Ul1_HPrr6lFPIn9O
53-
- text: C# Language development strategy
51+
- text: C# language strategy
5452
url: ./strategy.md
5553
- linkListType: concept
5654
links:
@@ -66,8 +64,8 @@ landingContent:
6664
url: ../fundamentals/coding-style/identifier-names.md
6765
- linkListType: tutorial
6866
links:
69-
- text: Display command-line
70-
url: ../fundamentals/tutorials/how-to-display-command-line-arguments.md
67+
- text: Build file-based apps
68+
url: ../fundamentals/tutorials/file-based-programs.md
7169
- text: Intro to classes
7270
url: ../fundamentals/tutorials/classes.md
7371
- text: Object oriented C#
@@ -106,6 +104,8 @@ landingContent:
106104
linkLists:
107105
- linkListType: overview
108106
links:
107+
- text: What you can build with C#
108+
url: ./what-you-can-build.md
109109
- text: C# language strategy
110110
url: ./strategy.md
111111
- text: "Programming concepts"
@@ -125,21 +125,6 @@ landingContent:
125125
- text: Learn C# for Python developers
126126
url: ./tips-for-python-developers.md
127127

128-
- title: "Advanced concepts"
129-
linkLists:
130-
- linkListType: reference
131-
links:
132-
- text: "Reflection and attributes"
133-
url: ../advanced-topics/reflection-and-attributes/index.md
134-
- text: "Expression trees"
135-
url: ../advanced-topics/expression-trees/index.md
136-
- text: "Native interoperability"
137-
url: ../advanced-topics/interop/index.md
138-
- text: "Performance engineering"
139-
url: ../advanced-topics/performance/index.md
140-
- text: ".NET Compiler Platform SDK"
141-
url: ../roslyn-sdk/index.md
142-
143128
- title: "C# language reference"
144129
linkLists:
145130
- linkListType: reference
@@ -152,25 +137,18 @@ landingContent:
152137
url: ../language-reference/operators/index.md
153138
- text: "Tokens"
154139
url: ../language-reference/tokens/index.md
155-
156-
- title: "C# language standard"
157-
linkLists:
158-
- linkListType: reference
159-
links:
160-
- text: "Overview"
161-
url: ../specification/overview.md
162-
- text: "C# language specification"
163-
url: ../../../_csharpstandard/standard/README.md
164-
- text: "Feature specifications"
165-
url: ../specification/feature-spec-overview.md
166140

167141
- title: "Stay in touch"
168142
linkLists:
169143
- linkListType: reference
170144
links:
145+
- text: "C# on Q&A"
146+
url: /answers/topics/dotnet-csharp.html
171147
- text: ".NET developer community"
172148
url: https://dotnet.microsoft.com/platform/community
149+
- text: "C# on Stack Overflow"
150+
url: https://stackoverflow.com/questions/tagged/c%23
151+
- text: "C# on Discord"
152+
url: https://aka.ms/csharp-discord
173153
- text: "YouTube"
174154
url: https://www.youtube.com/dotnet
175-
- text: "Twitter"
176-
url: https://twitter.com/DotNet

0 commit comments

Comments
 (0)