Skip to content
master
Go to file
Code

Latest commit

…n Local Functions page (#21117)

* improvements to contrast section
- use h3 headings to highlight differences
- add spacing between thoughts so semi-related expressions
don't read as if they were run-on sentences
- add example for yield return for local function
- add link to compiler error in yield return section

* refactor to use new code snippet insertion pattern
- remove YieldLocalFunc file
- add method to snippets\local-functions\Program.cs
- update syntax in local-functions.md

* Address feedback provided in PR

Fixed compile time error in YieldReturn example:
added usings for System.Collections.Generic and System.Linq

Change YieldReturn example to throw an ArgumentException
instead of a base Exception (following best practices) and combine
ToLower on item and yield return into one line instead of two operations

Address written content suggestions/alterations from
@BillWagner and @IEvangelist

* Extra curly brace was causing build to break

* Further changes based on PR discussion

Removed extraenous part of sentence regarding
the compiler from 'Heap allocations' section

Add previously missing negation to 'if (input.Any())' in
yield return example
60da862

Files

Permalink
Failed to load latest commit information.

README.md

.NET Docs

Markdownlint

This repository contains the conceptual documentation for .NET. The .NET documentation site is built from multiple repositories in addition to this one:

Issues and tasks for all but the API reference repository are tracked here. We have a large community using these resources. We make our best effort to respond to issues in a timely fashion. You can read more about our procedures for classifying and resolving issues in our Issues policy topic.

We welcome contributions to help us improve and complete the .NET docs. This is a very large repo, covering a large area. If this is your first visit, see our labels and projects roadmap for help navigating the issues and projects in this repository.

To contribute, see the Projects for .NET Community Contributors for ideas. The Contributing Guide has instructions on procedures we use.

If you're interested in helping migrate existing code that targets the .NET Framework from the retired Code Gallery site to .NET Core applications stored in our samples repository and downloadable from the Samples Browser, see the Code Gallery migration project. The code gallery samples were moved to the Microsoft Archive organization.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

You can’t perform that action at this time.