-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Rework interactive tutorials #50347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BillWagner
merged 21 commits into
dotnet:main
from
BillWagner:remove-interactive-tutorials
Dec 10, 2025
Merged
Rework interactive tutorials #50347
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2c34657
First pass edit.
BillWagner 160a109
First pass at the numbers tutorial
BillWagner cd57572
First pass of Tuples and types
BillWagner 0e5c771
First edit pass on branches and loops
BillWagner ed6824e
First edit pass on list collection tutorial
BillWagner 9a63f44
First pass edit on patterns
BillWagner 66127c8
fix warnings
BillWagner 19a1660
One more warning pass
BillWagner 947157c
Convert to file-based-apps
BillWagner b9fe3ad
Edit for using codespaces
BillWagner 563e904
Apply suggestions from code review
BillWagner e6b4ff9
Fix grammar.
BillWagner 4695033
Final grammar check
BillWagner fb41125
running a test build
BillWagner f07e364
Grammar edit
BillWagner 61ca81e
Rework all tutorials for style
BillWagner b3d2dc8
fix template lint
BillWagner 7298966
lint part 2
BillWagner ca3b5c6
Apply suggestions from code review
BillWagner 1c74b4a
address remaining comments.
BillWagner e8d09bf
lint
BillWagner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
195 changes: 126 additions & 69 deletions
195
docs/csharp/tour-of-csharp/tutorials/branches-and-loops.md
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,45 @@ | ||
| --- | ||
| title: Interactive tutorials | ||
| description: Learn C# in your browser, and get started with your own development environment | ||
| ms.date: 04/23/2025 | ||
| ms.date: 12/10/2025 | ||
| --- | ||
| # Introduction to C\# | ||
|
|
||
| Welcome to the introduction to C# tutorials. These lessons start with interactive code that you can run in your browser. You can learn the basics of C# from the [C# for Beginners video series](https://aka.ms/dotnet/beginnervideos/youtube/csharp) before starting these interactive lessons. | ||
| Welcome to the introduction to C# tutorials. These lessons start with interactive code that you can run in GitHub codespaces. You can learn the basics of C# from the [C# for Beginners video series](https://aka.ms/dotnet/beginnervideos/youtube/csharp) before starting these interactive lessons. | ||
|
|
||
| <!--markdownlint-disable-next-line MD034 --> | ||
| > [!VIDEO https://www.youtube.com/embed/9THmGiSPjBQ?si=3kUKFtOMLpEzeq7J] | ||
| The first lessons explain C# concepts using small snippets of code. You'll learn the basics of C# syntax and how to work with data types like strings, numbers, and booleans. It's all interactive, and you'll be writing and running code within minutes. These first lessons assume no prior knowledge of programming or the C# language. Each lesson builds on the prior lessons. You should do them in order. However, if you have some programming experience, you can skip or skim the first lessons and start with any new concepts. | ||
| The first lessons explain C# concepts by using small snippets of code. You learn the basics of C# syntax and how to work with data types like strings, numbers, and booleans. It's all interactive, and you'll be writing and running code within minutes. These first lessons assume no prior knowledge of programming or the C# language. Each lesson builds on the prior lessons. You should do them in order. However, if you have some programming experience, you can skip or skim the first lessons and start with any new concepts. | ||
|
|
||
| You can try these tutorials in different environments. The concepts you'll learn are the same. The difference is which experience you prefer: | ||
|
|
||
| - [In your browser, on the docs platform](hello-world.md): This experience embeds a runnable C# code window in docs pages. You write and execute C# code in the browser. | ||
| - [In the Microsoft Learn training experience](/training/paths/csharp-first-steps/). This learning path contains several modules that teach the basics of C#. | ||
| To use GitHub codespaces, you need to create a free [GitHub](https://github.com) account. | ||
|
|
||
| ## Hello world | ||
|
|
||
| In the [Hello world](hello-world.md) tutorial, you'll create the most basic C# program. You'll explore the `string` type and how to work with text. You can also use the path on [Microsoft Learn training](/training/paths/csharp-first-steps/). | ||
| In the [Hello world](hello-world.md) tutorial, you create the most basic C# program. You explore the `string` type and how to work with text. | ||
|
|
||
| ## Numbers in C\# | ||
|
|
||
| In the [Numbers in C#](numbers-in-csharp.md) tutorial, you'll learn how computers store numbers and how to perform calculations with different numeric types. You'll learn the basics of rounding, and how to perform mathematical calculations using C#. | ||
| In the [Numbers in C#](numbers-in-csharp.md) tutorial, you learn how computers store numbers and how to perform calculations with different numeric types. You learn the basics of rounding, and how to perform mathematical calculations using C#. | ||
|
|
||
| ## Tuples and types | ||
|
|
||
| In the [Tuples and types](tuples-and-types.md) tutorial, you'll learn to create types in C#. You can create *tuples*, *records*, *struct*, and *class* types. The capabilities of these different kinds of types reflect their different uses. | ||
| In the [Tuples and types](tuples-and-types.md) tutorial, you learn to create types in C#. You can create *tuples*, *records*, *struct*, and *class* types. The capabilities of these different kinds of types reflect their different uses. | ||
|
|
||
| ## Branches and loops | ||
|
|
||
| The [Branches and loops](branches-and-loops.md) tutorial teaches the basics of selecting different paths of code execution based on the values stored in variables. You'll learn the basics of control flow, which is the basis of how programs make decisions and choose different actions. | ||
| The [Branches and loops](branches-and-loops.md) tutorial teaches the basics of selecting different paths of code execution based on the values stored in variables. You learn the basics of control flow, which is the basis of how programs make decisions and choose different actions. | ||
|
|
||
| ## List collection | ||
|
|
||
| The [List collection](list-collection.md) lesson gives you a tour of the List collection type that stores sequences of data. You'll learn how to add and remove items, search for items, and sort the lists. You'll explore different kinds of lists. | ||
| The [List collection](list-collection.md) lesson gives you a tour of the List collection type that stores sequences of data. You learn how to add and remove items, search for items, and sort the lists. You explore different kinds of lists. | ||
|
|
||
| ## Pattern matching | ||
|
|
||
| The [Pattern matching](pattern-matching.md) lesson provides an introduction to *pattern matching*. Pattern matching enables you to compare an expression against a pattern. The success of the match determines which program logic to follow. Patterns can compare types, properties of a type, or contents of a list. You can combine multiple patterns using `and`, `or`, and `not` logic. Patterns provide a rich vocabulary to inspect data and make decisions in your program based on that inspection. | ||
| The [Pattern matching](pattern-matching.md) lesson provides an introduction to *pattern matching*. Pattern matching enables you to compare an expression against a pattern. The success of the match determines which program logic to follow. Patterns can compare types, properties of a type, or contents of a list. You can combine multiple patterns by using `and`, `or`, and `not` logic. Patterns provide a rich vocabulary to inspect data and make decisions in your program based on that inspection. | ||
|
|
||
| ## Set up your local environment | ||
|
|
||
| After you finish these tutorials, set up a development environment. You'll want: | ||
| After you finish these tutorials, set up a development environment. You need: | ||
BillWagner marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [!INCLUDE [Prerequisites](../../../../includes/prerequisites-basic-winget.md)] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.