Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit efd622b

Browse files
authored
Merge pull request #49 from BillWagner/index-remaining-samples
Add necessary files for samples browser indexing.
2 parents 7f6b6ff + 29ea6f3 commit efd622b

File tree

7 files changed

+160
-72
lines changed

7 files changed

+160
-72
lines changed

101-linq-samples/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ Learn how to use LINQ in your applications with these code samples, covering the
2121

2222
To run these samples, you'll need to follow the instructions on hte [dotnet/try-samples](https://github.com/dotnet/try-samples#basics) repository to install the global `dotnet try` tool in your .NET environment.
2323

24-
Once you've installed the global tool, running `dotnet try` loads the samples into a browser. The browser pages introduce important concepts in LINQ, and you an run teh code interactively in your browser.
24+
Once you've installed the global tool, running `dotnet try` loads the samples into a browser. The browser pages introduce important concepts in LINQ, and you run the code interactively in your browser.
2525

2626
If you loaded this page from `dotnet try`, click [here](index.md) to start the sample. (This link will not work in the samples browser).

Beginners/Readme.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
# Try .NET Enabled Samples
2-
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
1+
---
2+
name: "Learn programming using C# and Try.NET"
3+
description: "Explore the C# language, .NET, programming concepts. Learn to program interactively using the try.net interactive experience."
4+
page_type: sample
5+
languages:
6+
- csharp
7+
products:
8+
- dotnet-core
9+
---
310

4-
*Please read the [Try .NET quick setup guide](Setup.md) before starting the tutorial below.*
11+
# Learn programming with TRY.NET
12+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
513

614
<p align ="center">
715
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
816
</p>
9-
<h1 align ="center">Try .NET Samples</h1>
1017

11-
### Table of Content
12-
- [Introduction Programming with C#](HelloWorld.md)
13-
- [Pascals Triangle](TeachTheComputer.md)
18+
These explorations show you the structure of C# programs, working with text, numbers, and other core data structures.
19+
20+
## Learn to program using this tutorial
21+
22+
To run these samples, you'll need to follow the instructions on hte [dotnet/try-samples](https://github.com/dotnet/try-samples#basics) repository to install the global `dotnet try` tool in your .NET environment.
23+
24+
Once you've installed the global tool, running `dotnet try` loads the samples into a browser. The browser pages introduce important programming concepts through interactive exercises you run in your browser.
25+
26+
If you loaded this page from `dotnet try`, click [here](index.md) to start the sample. (This link will not work in the samples browser).

Beginners/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Try .NET Enabled Samples
2+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
3+
4+
*Please read the [Try .NET quick setup guide](Setup.md) before starting the tutorial below.*
5+
6+
<p align ="center">
7+
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
8+
</p>
9+
10+
### Table of Content
11+
- [Introduction Programming with C#](HelloWorld.md)
12+
- [Pascals Triangle](TeachTheComputer.md)

csharp7/index.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# What's new in C# 7.0 thru C# 7.3 - exploration
2+
3+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
4+
5+
<p align ="center">
6+
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
7+
</p>
8+
9+
The themes of these releases are:
10+
11+
## Better control over allocations and copies
12+
13+
The .NET environment manages memory automatically. However, some scenarios require developers to take more control over the memory footprint of their application. This has meant developers needed to write unsafe code. The goal of these features is to enable developers to achieve the performance of unsafe code while writing verifiably safe code. The features that enable these gains are:
14+
15+
- [ref locals and returns](./ref-locals-returns.md)
16+
- [in and ref readonly](./in-ref-readonly.md)
17+
- [readonly struct](./readonly-struct.md)
18+
- [ref struct](./readonly-struct#ref-struct-types.md)
19+
20+
## Pattern matching
21+
22+
Modern applications are often a collection of different programs that execute on multiple machines and platforms. That separates data from the code that consumes the data. A strict object oriented approach doesn't work as well in these systems. **Pattern matching** enables new ways to examine data using its type, shape, or values. The features added for pattern matching are:
23+
24+
- [pattern matching is expressions](./is-expressions.md)
25+
- [pattern matching with switch](./switch-patterns.md)
26+
- [pattern matching on generic type elements](./generic-patterns.md)
27+
28+
## Tuple data types
29+
30+
Tuples combine both of the previous themes: They are lightweight value types that contain multiple members:
31+
32+
- [Create lightweight data structures using tuples](./declare-tuples.md)
33+
34+
## Preparing for nullable reference types
35+
36+
Features were added to C# 7.x that make it easier to adopt nullable reference types in C# 8. These features reduce the locations where you must declare a variable and initialize it later.
37+
38+
- [Declare out variables when assigned](./out-variable-declaration.md)
39+
40+
Many of these use unsafe code, which aren't available in the local `dotnet try` environment. Learn more about them on docs.microsoft.com:
41+
42+
- [fixed fields without pinning](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3)
43+
- [stackalloc array initializers](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3#stackalloc-arrays-support-initializers)
44+
- [Conditional ref expressions](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-2#conditional-ref-expressions)
45+
46+
## Improve code organization and readability
47+
48+
Other features improve your ability to write clear code in a variety of scenarios:
49+
50+
- [local functions](local-functions.md)
51+
- [new generic constraints ](generic-constraints.md)
52+
53+
Two other features aren't in this tutorial. Learn more about them on docs.microsoft.com:
54+
55+
- [attributes on backing fields of properties](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3#attach-attributes-to-the-backing-fields-for-auto-implemented-properties)
56+
- [Async Main methods](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-1#async-main)
57+
- [default literal expressions](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-1#default-literal-expressions)
58+
- [Leading underscores in numeric literals](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-2#leading-underscores-in-numeric-literals)
59+
60+
You can try these scenarios and features in C# 7.x by stepping through the different sections of this tutorial. Or, you can select any of the preceding links to go to the feature you want to explore first.
61+
62+
## Next: [ref locals and returns &raquo;](./ref-locals-returns.md)

csharp7/readme.md

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,26 @@
1+
---
2+
name: "Explore C# 7.0 - 7.3"
3+
description: "Explore the new features in the C# language released in versions 7.0 - 7.3. Learn to program interactively using the try.net interactive experience with .NET Core."
4+
page_type: sample
5+
languages:
6+
- csharp
7+
products:
8+
- dotnet-core
9+
---
110
# What's new in C# 7.0 thru C# 7.3 - exploration
211

3-
This exploration enables you to experiment with the features that have been released in C# 7.0, and the following point releases through C# 7.3. You can try the code in the samples, modify it, and see the effects of using the new features in a variety of scenarios. Some of the features added in the point releases are enhancements and improvements to features first available in C# 7.0. This exploration is organized around the themes across all the C# 7.x features, rather than by release. As you explore each area, enhancements that are available in later point releases are noted.
4-
5-
The themes of these releases are:
6-
7-
## Better control over allocations and copies
8-
9-
The .NET environment manages memory automatically. However, some scenarios require developers to take more control over the memory footprint of their application. This has meant developers needed to write unsafe code. The goal of these features is to enable developers to achieve the performance of unsafe code while writing verifiably safe code. The features that enable these gains are:
10-
11-
- [ref locals and returns](./ref-locals-returns.md)
12-
- [in and ref readonly](./in-ref-readonly.md)
13-
- [readonly struct](./readonly-struct.md)
14-
- [ref struct](./readonly-struct#ref-struct-types.md)
15-
16-
## Pattern matching
17-
18-
Modern applications are often a collection of different programs that execute on multiple machines and platforms. That separates data from the code that consumes the data. A strict object oriented approach doesn't work as well in these systems. **Pattern matching** enables new ways to examine data using its type, shape, or values. The features added for pattern matching are:
19-
20-
- [pattern matching is expressions](./is-expressions.md)
21-
- [pattern matching with switch](./switch-patterns.md)
22-
- [pattern matching on generic type elements](./generic-patterns.md)
23-
24-
## Tuple data types
12+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
2513

26-
Tuples combine both of the previous themes: They are lightweight value types that contain multiple members:
14+
<p align ="center">
15+
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
16+
</p>
2717

28-
- [Create lightweight data structures using tuples](./declare-tuples.md)
29-
30-
## Preparing for nullable reference types
31-
32-
Features were added to C# 7.x that make it easier to adopt nullable reference types in C# 8. These features reduce the locations where you must declare a variable and initialize it later.
33-
34-
- [Declare out variables when assigned](./out-variable-declaration.md)
35-
36-
Many of these use unsafe code, which aren't available in the local `dotnet try` environment. Learn more about them on docs.microsoft.com:
37-
38-
- [fixed fields without pinning](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3)
39-
- [stackalloc array initializers](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3#stackalloc-arrays-support-initializers)
40-
- [Conditional ref expressions](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-2#conditional-ref-expressions)
41-
42-
## Improve code organization and readability
43-
44-
Other features improve your ability to write clear code in a variety of scenarios:
45-
46-
- [local functions](local-functions.md)
47-
- [new generic constraints ](generic-constraints.md)
18+
This exploration enables you to experiment with the features that have been released in C# 7.0, and the following point releases through C# 7.3. You can try the code in the samples, modify it, and see the effects of using the new features in a variety of scenarios. Some of the features added in the point releases are enhancements and improvements to features first available in C# 7.0. This exploration is organized around the themes across all the C# 7.x features, rather than by release. As you explore each area, enhancements that are available in later point releases are noted.
4819

49-
Two other features aren't in this tutorial. Learn more about them on docs.microsoft.com:
20+
## What's new in C# 7.0 thru C# 7.3 - exploration
5021

51-
- [attributes on backing fields of properties](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-3#attach-attributes-to-the-backing-fields-for-auto-implemented-properties)
52-
- [Async Main methods](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-1#async-main)
53-
- [default literal expressions](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-1#default-literal-expressions)
54-
- [Leading underscores in numeric literals](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-7-2#leading-underscores-in-numeric-literals)
22+
To run these samples, you'll need to follow the instructions on hte [dotnet/try-samples](https://github.com/dotnet/try-samples#basics) repository to install the global `dotnet try` tool in your .NET environment.
5523

56-
You can try these scenarios and features in C# 7.x by stepping through the different sections of this tutorial. Or, you can select any of the preceding links to go to the feature you want to explore first.
24+
Once you've installed the global tool, running `dotnet try` loads the samples into a browser. The browser pages introduce important programming concepts through interactive exercises you run in your browser.
5725

58-
## Next: [ref locals and returns &raquo;](./ref-locals-returns.md)
26+
If you loaded this page from `dotnet try`, click [here](index.md) to start the sample. (This link will not work in the samples browser).

csharp8/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# What's new in C# 8.0 - exploration
2+
3+
4+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
5+
6+
<p align ="center">
7+
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
8+
</p>
9+
10+
This exploration enables you to experiment with the features that have been released in C# 8.0, preview 2. You can try the code in the samples, modify it, and see the effects of using the new features in a variety of scenarios.
11+
12+
You can try the following features that first appeared in preview 2:
13+
14+
- [Pattern matching enhancements](./patterns.md):
15+
- [Static local functions](static-local-functions.md)
16+
- [Using declarations](using-declarations-ref-structs.md)
17+
18+
The following language features first appeared in C# 8.0 preview 1:
19+
20+
- [Nullable reference types](nullable-reference-types.md)
21+
- [Asynchronous streams](asynchronous-streams.md)
22+
- [Indices and ranges](indices-and-ranges.md)
23+
24+
> *Note*:
25+
> This exploration was last updated for C# 8.0 preview 2.
26+
27+
You can try all of the features in the upcoming version of C# by stepping through the different sections of this tutorial. Or, you can select any of the preceding links to go to the feature you want to explore first.
28+
29+
#### Next: [More patterns in more places &raquo;](./patterns.md)

csharp8/readme.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1+
---
2+
name: "Explore C# 8.0"
3+
description: "Explore the new features in the C# language released in version 8.0. Learn to program interactively using the try.net interactive experience with .NET Core."
4+
page_type: sample
5+
languages:
6+
- csharp
7+
products:
8+
- dotnet-core
9+
---
110
# What's new in C# 8.0 - exploration
211

3-
This exploration enables you to experiment with the features that have been released in C# 8.0, preview 2. You can try the code in the samples, modify it, and see the effects of using the new features in a variety of scenarios.
12+
![dotnet try Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
413

5-
You can try the following features that first appeared in preview 2:
14+
<p align ="center">
15+
<img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="350">
16+
</p>
617

7-
- [Pattern matching enhancements](./patterns.md):
8-
- [Static local functions](static-local-functions.md)
9-
- [Using declarations](using-declarations-ref-structs.md)
18+
This exploration enables you to experiment with the features that have been released in C# 8.0. You can try the code in the samples, modify it, and see the effects of using the new features in a variety of scenarios.
1019

11-
The following language features first appeared in C# 8.0 preview 1:
20+
## What's new in C# 8.0 - exploration
1221

13-
- [Nullable reference types](nullable-reference-types.md)
14-
- [Asynchronous streams](asynchronous-streams.md)
15-
- [Indices and ranges](indices-and-ranges.md)
22+
To run these samples, you'll need to follow the instructions on hte [dotnet/try-samples](https://github.com/dotnet/try-samples#basics) repository to install the global `dotnet try` tool in your .NET environment.
1623

17-
> *Note*:
18-
> This exploration was last updated for C# 8.0 preview 2.
24+
Once you've installed the global tool, running `dotnet try` loads the samples into a browser. The browser pages introduce important programming concepts through interactive exercises you run in your browser.
1925

20-
You can try all of the features in the upcoming version of C# by stepping through the different sections of this tutorial. Or, you can select any of the preceding links to go to the feature you want to explore first.
21-
22-
#### Next: [More patterns in more places &raquo;](./patterns.md)
26+
If you loaded this page from `dotnet try`, click [here](index.md) to start the sample. (This link will not work in the samples browser).

0 commit comments

Comments
 (0)