Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"branch_target_mapping": {
"live": [
"Publish",
"Pdf",
"Intellisense"
"Pdf"
],
"serverless-ebook": [
"Publish",
Expand Down
2 changes: 1 addition & 1 deletion docs/core/tutorials/netcore-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This tutorial and its associated sample build a Windows host; see the notes at t

## Creating the host

A [sample host](https://github.com/dotnet/samples/tree/master/core/hosting) demonstrating the steps outlined in this article is available in the dotnet/docs GitHub repository. Comments in the sample's *host.cpp* file clearly associate the numbered steps from this tutorial with where they're performed in the sample. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).
A [sample host](https://github.com/dotnet/samples/tree/master/core/hosting) demonstrating the steps outlined in this article is available in the dotnet/samples GitHub repository. Comments in the sample's *host.cpp* file clearly associate the numbered steps from this tutorial with where they're performed in the sample. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).

Keep in mind that the sample host is meant to be used for learning purposes, so it is light on error checking and is designed to emphasize readability over efficiency. More real-world host samples are available in the [dotnet/coreclr](https://github.com/dotnet/coreclr/tree/master/src/coreclr/hosts) repository. The [CoreRun host](https://github.com/dotnet/coreclr/tree/master/src/coreclr/hosts/corerun), in particular, is a good general-purpose host to study after reading through the simpler sample.

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tutorials/using-on-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Install the Visual Studio Code C# extension by opening Visual Studio Code and pr

## Getting started

In this tutorial, you create three projects: a library project, tests for that library project, and a console application that makes use of the library. You can [view or download the source](https://github.com/dotnet/samples/tree/master/core/getting-started/golden) for this topic at the dotnet/docs repository on GitHub. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).
In this tutorial, you create three projects: a library project, tests for that library project, and a console application that makes use of the library. You can [view or download the source](https://github.com/dotnet/samples/tree/master/core/getting-started/golden) for this topic at the dotnet/samples repository on GitHub. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).

Start Visual Studio Code. Press <kbd>Ctrl</kbd>+<kbd>\`</kbd> (the backquote or backtick character) or select **View > Integrated Terminal** from the menu to open an embedded terminal in Visual Studio Code. You can still open an external shell with the Explorer **Open in Command Prompt** command (**Open in Terminal** on Mac or Linux) if you prefer to work outside of Visual Studio Code.

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tutorials/using-with-xplat-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you're unfamiliar with the .NET Core CLI toolset, read the [.NET Core SDK ove

## Hello, Console App!

You can [view or download the sample code](https://github.com/dotnet/samples/tree/master/core/console-apps/HelloMsBuild) from the dotnet/docs GitHub repository. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).
You can [view or download the sample code](https://github.com/dotnet/samples/tree/master/core/console-apps/HelloMsBuild) from the dotnet/samples GitHub repository. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).

Open a command prompt and create a folder named *Hello*. Navigate to the folder you created and type the following:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Console.WriteLine(s);
}

// Example #2: var is required because
// Example #2: var is required when
// the select clause specifies an anonymous type
var custQuery = from cust in customers
where cust.City == "Phoenix"
Expand All @@ -23,4 +23,4 @@
foreach (var item in custQuery)
{
Console.WriteLine("Name={0}, Phone={1}", item.Name, item.Phone);
}
}
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/var.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int i = 10; //explicitly typed
For more information, see [Implicitly Typed Local Variables](../../../csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md) and [Type Relationships in LINQ Query Operations](../../../csharp/programming-guide/concepts/linq/type-relationships-in-linq-query-operations.md).

## Example
The following example shows two query expressions. In the first expression, the use of `var` is permitted but is not required, because the type of the query result can be stated explicitly as an `IEnumerable<string>`. However, in the second expression, `var` must be used because the result is a collection of anonymous types, and the name of that type is not accessible except to the compiler itself. Note that in Example #2, the `foreach` iteration variable `item` must also be implicitly typed.
The following example shows two query expressions. In the first expression, the use of `var` is permitted but is not required, because the type of the query result can be stated explicitly as an `IEnumerable<string>`. However, in the second expression, `var` allows the result to be a collection of anonymous types, and the name of that type is not accessible except to the compiler itself. Use of `var` eliminates the requirement to create a new class for the result. Note that in Example #2, the `foreach` iteration variable `item` must also be implicitly typed.

[!code-csharp[csrefKeywordsTypes#18](../../../csharp/language-reference/keywords/codesnippet/CSharp/var_1.cs)]

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/operators/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## [[] Operator](index-operator.md)
## [() Operator](invocation-operator.md)
## [. Operator](member-access-operator.md)
## [?. and ?[] Operators](null-conditional-operators.md)
## [:: Operator](namespace-alias-qualifer.md)
## [+ Operator](addition-operator.md)
## [- Operator](subtraction-operator.md)
Expand Down Expand Up @@ -40,4 +41,3 @@
## [-> Operator](dereference-operator.md)
## [?? Operator](null-conditional-operator.md)
## [=> Operator](lambda-operator.md)
## [Null-conditional Operators](null-conditional-operators.md)
8 changes: 4 additions & 4 deletions docs/csharp/programming-guide/main-and-command-args/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The addition of `async` and `Task`, `Task<int>` return types simplifies program
[!INCLUDE[CSharplangspec](~/includes/csharplangspec-md.md)]

## See also
[Command-line Building With csc.exe](../../../csharp/language-reference/compiler-options/command-line-building-with-csc-exe.md)
[C# Programming Guide](../../../csharp/programming-guide/index.md)
[Methods](../../../csharp/programming-guide/classes-and-structs/methods.md)
[Inside a C# Program](../../../csharp/programming-guide/inside-a-program/index.md)
[Command-line Building With csc.exe](../../../csharp/language-reference/compiler-options/command-line-building-with-csc-exe.md)
[C# Programming Guide](../../../csharp/programming-guide/index.md)
[Methods](../../../csharp/programming-guide/classes-and-structs/methods.md)
[Inside a C# Program](../../../csharp/programming-guide/inside-a-program/index.md)
2 changes: 1 addition & 1 deletion docs/csharp/tutorials/working-with-linq.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Magicians use this technique because every card is in a known location after eac

For our purposes, it is a light hearted look at manipulating sequences of data. The application you'll build will construct a card deck, and then perform a sequence of shuffles, writing the sequence out each time. You'll also compare the updated order to the original order.

This tutorial has multiple steps. After each step, you can run the application and see the progress. You can also see the [completed sample](https://github.com/dotnet/samples/blob/master/csharp/getting-started/console-linq) in the dotnet/docs GitHub repository. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).
This tutorial has multiple steps. After each step, you can run the application and see the progress. You can also see the [completed sample](https://github.com/dotnet/samples/blob/master/csharp/getting-started/console-linq) in the dotnet/samples GitHub repository. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/docker/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The sample console application is a simple example which takes an argument, a qu

In addition to the answer, the `Environment.MachineName` has been added to the response to show the difference between running the application locally and in a Windows container. When running the application locally, your local machine name should be returned and when running in a Windows Container; the container session id is returned.

The [complete example](https://github.com/dotnet/samples/tree/master/framework/docker/ConsoleRandomAnswerGenerator) is available in the dotnet/docs repository on GitHub. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).
The [complete example](https://github.com/dotnet/samples/tree/master/framework/docker/ConsoleRandomAnswerGenerator) is available in the dotnet/samples repository on GitHub. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#viewing-and-downloading-samples).

You need to be familiar with some Docker terms before you begin working
on moving your application to a container.
Expand Down
28 changes: 14 additions & 14 deletions docs/samples-and-tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ The .NET documentation contains a set of samples and tutorials that teach you ab

**[Unit Testing in .NET Core using dotnet test](../core/testing/unit-testing-with-dotnet-test.md)**

This guide shows you how to create an ASP.NET Core web app and associated unit tests. It starts by creating a simple web service app and then adds tests. It continues with creating more tests to guide implementing new features. The [completed sample](https://github.com/dotnet/samples/tree/master/core/getting-started/unit-testing-using-dotnet-test) is available in the dotnet/docs repository on GitHub.
This guide shows you how to create an ASP.NET Core web app and associated unit tests. It starts by creating a simple web service app and then adds tests. It continues with creating more tests to guide implementing new features. The [completed sample](https://github.com/dotnet/samples/tree/master/core/getting-started/unit-testing-using-dotnet-test) is available in the dotnet/samples repository on GitHub.

### Tutorials

**[Writing .NET Core console apps using the CLI tools: A step-by-step guide](../core/tutorials/using-with-xplat-cli.md)**

This guide shows you how to use the .NET Core CLI tooling to build cross-platform console apps. It starts with a basic console app and eventually spans multiple projects, including testing. You add features step-by-step, building your knowledge as you go. The [completed sample](https://github.com/dotnet/samples/tree/master/core/console-apps) is available in the dotnet/docs repository on GitHub.
This guide shows you how to use the .NET Core CLI tooling to build cross-platform console apps. It starts with a basic console app and eventually spans multiple projects, including testing. You add features step-by-step, building your knowledge as you go. The [completed sample](https://github.com/dotnet/samples/tree/master/core/console-apps) is available in the dotnet/samples repository on GitHub.

**[Writing Libraries with Cross Platform Tools](../core/tutorials/libraries.md)**

This sample covers how to write libraries for .NET using cross-platform CLI tools. These tools provide an efficient and low-level experience that works across any supported operating system. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/libraries/frameworks-library) is available in the dotnet/docs repository on GitHub.
This sample covers how to write libraries for .NET using cross-platform CLI tools. These tools provide an efficient and low-level experience that works across any supported operating system. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/libraries/frameworks-library) is available in the dotnet/samples repository on GitHub.

## ASP.NET Core

Expand All @@ -43,41 +43,41 @@ See the [ASP.NET Core tutorials](/aspnet/core/tutorials/). Many articles in the

**[Iterators](../csharp/iterators.md)**

This sample demonstrates the syntax and features for creating and consuming C# iterators. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/iterators) is available in the dotnet/docs repository on GitHub.
This sample demonstrates the syntax and features for creating and consuming C# iterators. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/iterators) is available in the dotnet/samples repository on GitHub.

**[Indexers](../csharp/indexers.md)**

This sample demonstrates the syntax and features for C# indexers. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/indexers) is available in the dotnet/docs repository on GitHub.
This sample demonstrates the syntax and features for C# indexers. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/indexers) is available in the dotnet/samples repository on GitHub.

**[Delegates and Events](../csharp/delegates-events.md)**

This sample demonstrates the syntax and features for C# delegates and events. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/delegates-and-events) is available in the dotnet/docs repository on GitHub. A [second sample](https://github.com/dotnet/samples/tree/master/csharp/events) focused on events is also in the same repository.
This sample demonstrates the syntax and features for C# delegates and events. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/delegates-and-events) is available in the dotnet/samples repository on GitHub. A [second sample](https://github.com/dotnet/samples/tree/master/csharp/events) focused on events is also in the same repository.

**[Expression Trees](../csharp/expression-trees.md)**

This sample demonstrates many of the problems that can be solved by using Expression Trees. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/expression-trees) is available in the dotnet/docs repository on GitHub.
This sample demonstrates many of the problems that can be solved by using Expression Trees. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/expression-trees) is available in the dotnet/samples repository on GitHub.

**LINQ Samples**

This series of samples demonstrate many of the features of Language Integrated Query (LINQ). The [completed sample](https://github.com/dotnet/samples/tree/master/core/linq/csharp) is available in the dotnet/docs repository on GitHub.
This series of samples demonstrate many of the features of Language Integrated Query (LINQ). The [completed sample](https://github.com/dotnet/samples/tree/master/core/linq/csharp) is available in the dotnet/samples repository on GitHub.

### Tutorials

**[Console Application](../csharp/tutorials/console-teleprompter.md)**

This tutorial demonstrates Console I/O, the structure of a console app, and the basics of the task-based asynchronous programming model. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-teleprompter) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates Console I/O, the structure of a console app, and the basics of the task-based asynchronous programming model. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-teleprompter) is available in the dotnet/samples repository on GitHub.

**[REST Client](../csharp/tutorials/console-webapiclient.md)**

This tutorial demonstrates web communications, JSON serialization, and object-oriented features of the C# language. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-webapiclient) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates web communications, JSON serialization, and object-oriented features of the C# language. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-webapiclient) is available in the dotnet/samples repository on GitHub.

**[Working with LINQ](../csharp/tutorials/working-with-linq.md)**

This tutorial demonstrates many of the features of LINQ and the language elements that support it. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-linq) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates many of the features of LINQ and the language elements that support it. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-linq) is available in the dotnet/samples repository on GitHub.

**[Microservices hosted in Docker](../csharp/tutorials/microservices.md)**

This tutorial demonstrates building an ASP.NET Core microservice and hosting it in Docker. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/WeatherMicroservice) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates building an ASP.NET Core microservice and hosting it in Docker. The [completed sample](https://github.com/dotnet/samples/tree/master/csharp/getting-started/WeatherMicroservice) is available in the dotnet/samples repository on GitHub.

**[Getting started with .NET Core on macOS using Visual Studio for Mac](../core/tutorials/using-on-mac-vs.md)**

Expand All @@ -91,11 +91,11 @@ This tutorial shows you how to build a complete .NET Core solution that includes

**[Running ASP.NET MVC Applications in Windows Docker Containers](../framework/docker/aspnetmvc.md)**

This tutorial demonstrates how to deploy an existing ASP.NET MVC app in a Windows Docker Container. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/docker/MVCRandomAnswerGenerator) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates how to deploy an existing ASP.NET MVC app in a Windows Docker Container. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/docker/MVCRandomAnswerGenerator) is available in the dotnet/samples repository on GitHub.

**[Running .NET Framework Console Applications in Windows Containers](../framework/docker/console.md)**

This tutorial demonstrates how to deploy an existing console app in a Windows container. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/docker/ConsoleRandomAnswerGenerator) is available in the dotnet/docs repository on GitHub.
This tutorial demonstrates how to deploy an existing console app in a Windows container. The [completed sample](https://github.com/dotnet/samples/tree/master/framework/docker/ConsoleRandomAnswerGenerator) is available in the dotnet/samples repository on GitHub.

## Viewing and downloading samples

Expand Down
Loading