This commit is contained in:
Youssef Victor 2021-05-19 18:36:42 +02:00 коммит произвёл GitHub
Родитель 4caae19e8e
Коммит c1aa479477
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
40 изменённых файлов: 71 добавлений и 49 удалений

14
.github/workflows/markdown-links-verifier.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,14 @@
name: Markdown links verifier
on: pull_request
jobs:
validate_links:
name: Markdown links verifier
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
- name: Validate links
uses: Youssef1313/markdown-links-verifier@b3f470e17f1324c6e5401098b910b926515734fb #@v0.0.9

Просмотреть файл

@ -50,5 +50,5 @@ The Microsoft platform and tools for containerized Docker apps, as defined in Ta
Thus, Microsoft offers a complete foundation for an end-to-end containerized Docker application life cycle. However, it's *a collection of products and technologies that allow you to optionally select and integrate with existing tools and processes*. The flexibility in a broad approach along with the strength in the depth of capabilities place Microsoft in a strong position for containerized Docker application development.
>[!div class="step-by-step"]
>[Previous](../Docker-application-lifecycle/containers-foundation-for-devops-collaboration.md)
>[Previous](../docker-application-lifecycle/containers-foundation-for-devops-collaboration.md)
>[Next](../design-develop-containerized-apps/index.md)

Просмотреть файл

@ -32,11 +32,11 @@ Using the **ASP.NET Core Web Application** project template as an example, this
The **Connected Services** page appears as shown in the following image:
![Visual Studio Connected Services tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-ConnectedServicesPage.png)
![Visual Studio Connected Services tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-connectedservicespage.png)
2. On the **Connected Services** page, click **Microsoft WCF Web Service Reference Provider**. This brings up the **Configure WCF Web Service Reference** wizard:
![Visual Studio Service Endpoint tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-ServiceEndpointPage.png)
![Visual Studio Service Endpoint tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-serviceendpointpage.png)
3. Select a service.
@ -52,7 +52,7 @@ Using the **ASP.NET Core Web Application** project template as an example, this
4. The **Data Type Options** form enables you to refine the generated service reference configuration settings:
![Visual Studio Data type options tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-DataTypesPage.png)
![Visual Studio Data type options tab for .NET Core](./media/wcf-web-service-reference-guide/wcfcs-datatypespage.png)
> [!NOTE]
> The **Reuse types in referenced assemblies** check box option is useful when data types needed for service reference code generation are defined in one of your project's referenced assemblies. It's important to reuse those existing data types to avoid compile-time type clash or runtime issues.
@ -67,7 +67,7 @@ While displaying progress, the tool:
- Generates the service reference code in a file named *reference.cs*, and adds it to your project under the **Connected Services** node.
- Updates the project file (.csproj) with NuGet package references required to compile and run on the target platform.
![Visual Studio Progress window](./media/wcf-web-service-reference-guide/wcfcs-ProgressWindow.png)
![Visual Studio Progress window](./media/wcf-web-service-reference-guide/wcfcs-progresswindow.png)
When these processes complete, you can create an instance of the generated WCF client type and invoke the service operations.

Просмотреть файл

@ -172,9 +172,9 @@ Without these types, when passing such items as a portion of an array or a secti
The following example uses a <xref:System.Span%601> and <xref:System.Memory%601> instance to provide a virtual view of 10 elements of an array.
[!code-csharp[Span\<T>](./snippets/dotnet-core-2-1/csharp/program.cs)]
[!code-csharp[Span\<T>](./snippets/dotnet-core-2-1/csharp/Program.cs)]
[!code-vb[Memory\<T>](./snippets/dotnet-core-2-1/vb/program.vb)]
[!code-vb[Memory\<T>](./snippets/dotnet-core-2-1/vb/Program.vb)]
### Brotli compression

Просмотреть файл

@ -11,7 +11,7 @@ An **identifier** is the name you assign to a type (class, interface, struct, de
- Identifiers may contain Unicode letter characters, decimal digit characters, Unicode connecting characters, Unicode combining characters, or Unicode formatting characters. For more information on Unicode categories, see the [Unicode Category Database](https://www.unicode.org/reports/tr44/).
You can declare identifiers that match C# keywords by using the `@` prefix on the identifier. The `@` is not part of the identifier name. For example, `@if` declares an identifier named `if`. These [verbatim identifiers](../../language-reference/tokens/verbatim.md) are primarily for interoperability with identifiers declared in other languages.
For a complete definition of valid identifiers, see the [Identifiers topic in the C# Language Specification](../../../../_csharplang/spec/lexical-structure.md#identifiers).
For a complete definition of valid identifiers, see the [Identifiers topic in the C# Language Specification](~/_csharplang/spec/lexical-structure.md#identifiers).
## Naming conventions

Просмотреть файл

@ -37,27 +37,27 @@ This section provides reference material about C# keywords, operators, special c
[C# Compiler Errors](./compiler-messages/index.md)
Includes code snippets that demonstrate the cause and correction of C# compiler errors and warnings.
[C# Language Specification](../../../_csharplang/spec/introduction.md)
[C# Language Specification](~/_csharplang/spec/introduction.md)
The C# 6.0 language specification. This is a draft proposal for the C# 6.0 language. This document will be refined through work with the ECMA C# standards committee. Version 5.0 has been released in December 2017 as the [Standard ECMA-334 5th Edition](https://www.ecma-international.org/wp-content/uploads/ECMA-334_5th_edition_december_2017.pdf) document.
The features that have been implemented in C# versions after 6.0 are represented in language specification proposals. These documents describe the deltas to the language spec in order to add these new features. These are in draft proposal form. These specifications will be refined and submitted to the ECMA standards committee for formal review and incorporation into a future version of the C# Standard.
[C# 7.0 Specification Proposals](../../../_csharplang/proposals/csharp-7.0/pattern-matching.md)
[C# 7.0 Specification Proposals](~/_csharplang/proposals/csharp-7.0/pattern-matching.md)
There are a number of new features implemented in C# 7.0. They include pattern matching, local functions, out variable declarations, throw expressions, binary literals, and digit separators. This folder contains the specifications for each of those features.
[C# 7.1 Specification Proposals](../../../_csharplang/proposals/csharp-7.1/async-main.md)
[C# 7.1 Specification Proposals](~/_csharplang/proposals/csharp-7.1/async-main.md)
There are new features added in C# 7.1. First, you can write a `Main` method that returns `Task` or `Task<int>`. This enables you to add the `async` modifier to `Main`. The `default` expression can be used without a type in locations where the type can be inferred. Also, tuple member names can be inferred. Finally, pattern matching can be used with generics.
[C# 7.2 Specification Proposals](../../../_csharplang/proposals/csharp-7.2/readonly-ref.md)
[C# 7.2 Specification Proposals](~/_csharplang/proposals/csharp-7.2/readonly-ref.md)
C# 7.2 added a number of small features. You can pass arguments by readonly reference using the `in` keyword. There are a number of low-level changes to support compile-time safety for `Span` and related types. You can use named arguments where later arguments are positional, in some situations. The `private protected` access modifier enables you to specify that callers are limited to derived types implemented in the same assembly. The `?:` operator can resolve to a reference to a variable. You can also format hexadecimal and binary numbers using a leading digit separator.
[C# 7.3 Specification Proposals](../../../_csharplang/proposals/csharp-7.3/blittable.md)
[C# 7.3 Specification Proposals](~/_csharplang/proposals/csharp-7.3/blittable.md)
C# 7.3 is another point release that includes several small updates. You can use new constraints on generic type parameters. Other changes make it easier to work with `fixed` fields, including using [`stackalloc`](./operators/stackalloc.md) allocations. Local variables declared with the `ref` keyword may be reassigned to refer to new storage. You can place attributes on auto-implemented properties that target the compiler-generated backing field. Expression variables can be used in initializers. Tuples can be compared for equality (or inequality). There have also been some improvements to overload resolution.
[C# 8.0 Specification Proposals](../../../_csharplang/proposals/csharp-8.0/nullable-reference-types.md)
[C# 8.0 Specification Proposals](~/_csharplang/proposals/csharp-8.0/nullable-reference-types.md)
C# 8.0 is available with .NET Core 3.0. The features include nullable reference types, recursive pattern matching, default interface methods, async streams, ranges and indexes, pattern based using and using declarations, null coalescing assignment, and readonly instance members.
[C# 9.0 Specification Proposals](../../../_csharplang/proposals/csharp-9.0/records.md)
[C# 9.0 Specification Proposals](~/_csharplang/proposals/csharp-9.0/records.md)
C# 9.0 is available with .NET 5.0. The features include records, top-level statements, pattern matching enhancements, init only setters, target-typed new expressions, module initializers, extending partial methods, static anonymous functions, target-typed conditional expressions, covariant return types, extension GetEnumerator in foreach loops, lambda discard parameters, attributes on local functions, native sized integers, function pointers, suppress emitting localsinit flag, and unconstrained type parameter annotations.
## Related sections

Просмотреть файл

@ -58,7 +58,7 @@ To run the code as a Windows Store app:
- Paste this code into the `MainPage` class in MainPage.xaml.cs.
- Add using directives for System.Net.Http and System.Threading.Tasks.
[!code-csharp[wpf-async](../../../../samples/snippets/csharp/language-reference/keywords/async/wpf/mainwindow.xaml.cs#1)]
[!code-csharp[wpf-async](../../../../samples/snippets/csharp/language-reference/keywords/async/wpf/MainWindow.xaml.cs#1)]
> [!IMPORTANT]
> For more information about tasks and the code that executes while waiting for a task, see [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md). For a full console example that uses similar elements, see [Process asynchronous tasks as they complete (C#)](../../programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md).

Просмотреть файл

@ -44,7 +44,7 @@ With the `volatile` modifier added to the declaration of `_shouldStop` in place,
## See also
- [C# language specification: volatile keyword](../../../../_csharplang/spec/classes.md#volatile-fields)
- [C# language specification: volatile keyword](~/_csharplang/spec/classes.md#volatile-fields)
- [C# Reference](../index.md)
- [C# Programming Guide](../../programming-guide/index.md)
- [C# Keywords](index.md)

Просмотреть файл

@ -102,7 +102,7 @@ If you declare a local function and only reference it by calling it like a metho
### Variable capture
The rules of [definite assignment](../../../../_csharplang/spec/variables.md#definite-assignment) also affect any variables that are captured by the local function or lambda expression. The compiler can perform static analysis that enables local functions to definitely assign captured variables in the enclosing scope. Consider this example:
The rules of [definite assignment](~/_csharplang/spec/variables.md#definite-assignment) also affect any variables that are captured by the local function or lambda expression. The compiler can perform static analysis that enables local functions to definitely assign captured variables in the enclosing scope. Consider this example:
```csharp
int M()

Просмотреть файл

@ -74,9 +74,9 @@ The following example shows the behavior of an async event handler. In the examp
## Generalized async return types and ValueTask\<TResult\>
Starting with C# 7.0, an async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the <xref:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute?displayProperty=nameWithType> attribute. You can learn more in the feature spec for [Task like return types](../../../../../_csharplang/proposals/csharp-7.0/task-types.md).
Starting with C# 7.0, an async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the <xref:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute?displayProperty=nameWithType> attribute. You can learn more in the feature spec for [Task like return types](~/_csharplang/proposals/csharp-7.0/task-types.md).
This feature is the complement to [awaitable expressions](../../../../../_csharplang/spec/expressions.md#awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations.
This feature is the complement to [awaitable expressions](~/_csharplang/spec/expressions.md#awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations.
.NET provides the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> structure as a lightweight implementation of a generalized task-returning value. To use the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> type, you must add the `System.Threading.Tasks.Extensions` NuGet package to your project. The following example uses the <xref:System.Threading.Tasks.ValueTask%601> structure to retrieve the value of two dice rolls.

Просмотреть файл

@ -32,6 +32,6 @@ api_type:
- [EventPipe Overview](../../../core/diagnostics/eventpipe.md)
- [Well Known EventProviders](../../../core/diagnostics/well-known-event-providers.md)
- [Profiling Interfaces](profiling-interfaces.md)
- [ICorProfilerInfo12 Interface](ICorProfilerInfo12-interface.md)
- [ICorProfilerInfo12.EventPipeStartSession method](ICorProfilerInfo12-eventpipestartsession-method.md)
- [ICorProfilerInfo12.EventPipeStopSession method](ICorProfilerInfo12-eventpipestopsession-method.md)
- [ICorProfilerInfo12 Interface](icorprofilerinfo12-interface.md)
- [ICorProfilerInfo12.EventPipeStartSession method](icorprofilerinfo12-eventpipestartsession-method.md)
- [ICorProfilerInfo12.EventPipeStopSession method](icorprofilerinfo12-eventpipestopsession-method.md)

Просмотреть файл

@ -20,7 +20,7 @@ api_type:
|Method|Description|
|------------|-----------------|
|[DynamicMethodUnloaded Method](ICorProfilerCallback9-dynamicmethodunloaded-method.md)|Notifies the profiler that a dynamic method has been garbage collected and subsequently unloaded.|
|[DynamicMethodUnloaded Method](icorprofilercallback9-dynamicmethodunloaded-method.md)|Notifies the profiler that a dynamic method has been garbage collected and subsequently unloaded.|
## Requirements

Просмотреть файл

@ -65,4 +65,4 @@ Alternatively, you can first call `GetCodeInfo4` with a zero-length `codeInfos`
## See also
- [ICorProfilerInfo9 Interface](ICorProfilerInfo9-interface.md)
- [ICorProfilerInfo9 Interface](icorprofilerinfo9-interface.md)

Просмотреть файл

@ -54,4 +54,4 @@ Area of Circle: 78.539816
- [Classes](classes.md)
- [Members](./members/index.md)
- [Methods](./members/methods.md)
- [Properties](./members/Properties.md)
- [Properties](./members/properties.md)

Просмотреть файл

@ -66,7 +66,7 @@ F# provides operators for these types of conversions. The `:>` operator casts up
### Upcasting
In many object-oriented languages, upcasting is implicit; in F#, the rules are slightly different. Upcasting is applied automatically when you pass arguments to methods on an object type. However, for let-bound functions in a module, upcasting is not automatic, unless the parameter type is declared as a flexible type. For more information, see [Flexible Types](flexible-Types.md).
In many object-oriented languages, upcasting is implicit; in F#, the rules are slightly different. Upcasting is applied automatically when you pass arguments to methods on an object type. However, for let-bound functions in a module, upcasting is not automatic, unless the parameter type is declared as a flexible type. For more information, see [Flexible Types](flexible-types.md).
The `:>` operator performs a static cast, which means that the success of the cast is determined at compile time. If a cast that uses `:>` compiles successfully, it is a valid cast and has no chance of failure at run time.

Просмотреть файл

@ -1,9 +1,10 @@
---
title: Classes
title: Classes in F#
titleSuffix: ""
description: Learn how F# Classes are types that represent objects that can have properties, methods, and events.
ms.date: 05/16/2016
---
# Classes
# Classes (F#)
*Classes* are types that represent objects that can have properties, methods, and events.
@ -98,7 +99,7 @@ Type arguments are inferred when the type is used. In the following code, the in
## Specifying Inheritance
The `inherit` clause identifies the direct base class, if there is one. In F#, only one direct base class is allowed. Interfaces that a class implements are not considered base classes. Interfaces are discussed in the [Interfaces](Interfaces.md) topic.
The `inherit` clause identifies the direct base class, if there is one. In F#, only one direct base class is allowed. Interfaces that a class implements are not considered base classes. Interfaces are discussed in the [Interfaces](interfaces.md) topic.
You can access the methods and properties of the base class from the derived class by using the language keyword `base` as an identifier, followed by a period (.) and the name of the member.

Просмотреть файл

@ -20,6 +20,6 @@ In addition, as the stack is unwound, the runtime executes any code in `finally`
|[Exception Types](exception-types.md)|Describes how to declare an exception type.|
|[Exceptions: The `try...with` Expression](the-try-with-expression.md)|Describes the language construct that supports exception handling.|
|[Exceptions: The `try...finally` Expression](the-try-finally-expression.md)|Describes the language construct that enables you to execute clean-up code as the stack unwinds when an exception is thrown.|
|[Exceptions: the `raise` Function](the-raise-Function.md)|Describes how to throw an exception object.|
|[Exceptions: the `raise` Function](the-raise-function.md)|Describes how to throw an exception object.|
|[Exceptions: The `failwith` Function](the-failwith-function.md)|Describes how to generate a general F# exception.|
|[Exceptions: The `invalidArg` Function](the-invalidArg-function.md)|Describes how to generate an invalid argument exception.|

Просмотреть файл

@ -33,7 +33,7 @@ The following table shows reference topics available that describe language conc
|[Automatic Generalization](./generics/automatic-generalization.md)|Describes generic constructs in F#.|
|[Inheritance](inheritance.md)|Describes inheritance, which is used to model the "is-a" relationship, or subtyping, in object-oriented programming.|
|[Members](./members/index.md)|Describes members of F# object types.|
|[Parameters and Arguments](Parameters-and-Arguments.md)|Describes language support for defining parameters and passing arguments to functions, methods, and properties. It includes information about how to pass by reference.|
|[Parameters and Arguments](parameters-and-arguments.md)|Describes language support for defining parameters and passing arguments to functions, methods, and properties. It includes information about how to pass by reference.|
|[Operator Overloading](operator-overloading.md)|Describes how to overload arithmetic operators in a class or record type, and at the global level.|
|[Casting and Conversions](casting-and-conversions.md)|Describes support for type conversions in F#.|
|[Access Control](access-control.md)|Describes access control in F#. Access control means declaring what clients are able to use certain program elements, such as types, methods, functions, and so on.|

Просмотреть файл

@ -91,7 +91,7 @@ The following table shows all F# keywords in alphabetical order, together with b
|-------|----|-----------|
|`abstract`|[Members](./members/index.md)<br /><br />[Abstract Classes](abstract-classes.md)|Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation.|
|`and`|[`let` Bindings](./functions/let-bindings.md)<br /><br />[Records](records.md)<br /><br />[Members](./members/index.md)<br /><br />[Constraints](./generics/constraints.md)|Used in mutually recursive bindings and records, in property declarations, and with multiple constraints on generic parameters.|
|`as`|[Classes](classes.md)<br /><br />[Pattern Matching](Pattern-Matching.md)|Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match.|
|`as`|[Classes](classes.md)<br /><br />[Pattern Matching](pattern-matching.md)|Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match.|
|`assert`|[Assertions](assertions.md)|Used to verify code during debugging.|
|`base`|[Classes](classes.md)<br /><br />[Inheritance](inheritance.md)|Used as the name of the base class object.|
|`begin`|[Verbose Syntax](verbose-syntax.md)|In verbose syntax, indicates the start of a code block.|
@ -139,7 +139,7 @@ The following table shows all F# keywords in alphabetical order, together with b
|`private`|[Access Control](access-control.md)|Restricts access to a member to code in the same type or module.|
|`public`|[Access Control](access-control.md)|Allows access to a member from outside the type.|
|`rec`|[Functions](./functions/index.md)|Used to indicate that a function is recursive.|
|`return`|[Asynchronous Workflows](Asynchronous-Workflows.md)<br /><br />[Computation Expressions](computation-expressions.md)|Used to indicate a value to provide as the result of a computation expression.|
|`return`|[Asynchronous Workflows](asynchronous-workflows.md)<br /><br />[Computation Expressions](computation-expressions.md)|Used to indicate a value to provide as the result of a computation expression.|
|`return!`|[Computation Expressions](computation-expressions.md)<br /><br />[Asynchronous Workflows](asynchronous-workflows.md)|Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression.|
|`select`|[Query Expressions](query-expressions.md)|Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context.|
|`static`|[Members](./members/index.md)|Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type.|

Просмотреть файл

@ -30,7 +30,7 @@ The following table shows the literal types in F#. Characters that represent dig
|bigint|integer not limited to 64-bit representation|I|`9999999999999999999999999999I`|
|decimal|fractional number represented as a fixed point or rational number|M or m|`0.7833M` or `0.7833m`|
|Char|Unicode character|none|`'a'` or `'\u0061'`|
|String|Unicode string|none|`"text\n"`<br /><br />or<br /><br />`@"c:\filename"`<br /><br />or<br /><br />`"""<book title="Paradise Lost">"""`<br /><br />or<br /><br />`"string1" + "string2"`<br /><br />See also [Strings](Strings.md).|
|String|Unicode string|none|`"text\n"`<br /><br />or<br /><br />`@"c:\filename"`<br /><br />or<br /><br />`"""<book title="Paradise Lost">"""`<br /><br />or<br /><br />`"string1" + "string2"`<br /><br />See also [Strings](strings.md).|
|byte|ASCII character|B|`'a'B`|
|byte[]|ASCII string|B|`"text"B`|
|String or byte[]|verbatim string|@ prefix|`@"\\server\share"` (Unicode)<br /><br />`@"\\server\share"B` (ASCII)|

Просмотреть файл

@ -44,4 +44,4 @@ Initializing object 1 2 2 4 8 16
- [Classes](../classes.md)
- [Constructors](constructors.md)
- [`let` Bindings in Classes](let-bindings-in-classes.md)
- [`do` Bindings](../functions/do-Bindings.md)
- [`do` Bindings](../functions/do-bindings.md)

Просмотреть файл

@ -9,9 +9,9 @@ This section describes members of F# object types.
## Remarks
*Members* are features that are part of a type definition and are declared with the `member` keyword. F# object types such as records, classes, discriminated unions, interfaces, and structures support members. For more information, see [Records](../records.md), [Classes](../classes.md), [Discriminated Unions](../discriminated-Unions.md), [Interfaces](../interfaces.md), and [Structures](../structures.md).
*Members* are features that are part of a type definition and are declared with the `member` keyword. F# object types such as records, classes, discriminated unions, interfaces, and structures support members. For more information, see [Records](../records.md), [Classes](../classes.md), [Discriminated Unions](../discriminated-unions.md), [Interfaces](../interfaces.md), and [Structures](../structures.md).
Members typically make up the public interface for a type, which is why they are public unless otherwise specified. Members can also be declared private or internal. For more information, see [Access Control](../access-Control.md). Signatures for types can also be used to expose or not expose certain members of a type. For more information, see [Signatures](../signature-files.md).
Members typically make up the public interface for a type, which is why they are public unless otherwise specified. Members can also be declared private or internal. For more information, see [Access Control](../access-control.md). Signatures for types can also be used to expose or not expose certain members of a type. For more information, see [Signatures](../signature-files.md).
Private fields and `do` bindings, which are used only with classes, are not true members, because they are never part of the public interface of a type and are not declared with the `member` keyword, but they are described in this section also.

Просмотреть файл

@ -2432,4 +2432,4 @@ end
- [F# Language Reference](index.md)
- [QueryBuilder Class](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-linq-querybuilder.html)
- [Computation Expressions](Computation-Expressions.md)
- [Computation Expressions](computation-expressions.md)

Просмотреть файл

@ -44,5 +44,5 @@ Values marked `mutable` may be automatically promoted to `'a ref` if captured by
## See also
- [Null Values](null-Values.md)
- [Null Values](null-values.md)
- [F# Language Reference](../index.md)

Просмотреть файл

@ -62,7 +62,7 @@ public Book(string title)
> [!TIP]
> A code fix is available for this rule in Visual Studio. To use it, position the cursor on the `string` literal and press **Ctrl**+**.** (period). Choose **Use nameof to express symbol names** from the list of options that's presented.
>
> ![Code fix for CA1507 - use nameof to express symbol names](media/ca1507-code-fix.PNG)
> ![Code fix for CA1507 - use nameof to express symbol names](media/ca1507-code-fix.png)
## When to suppress warnings

Просмотреть файл

@ -50,7 +50,7 @@ It is NOT safe to suppress a warning from this rule, we recommend using the more
## Related rules
- [CA2231: Overload operator equals on overriding ValueType.Equals](CA2231.md)
- [CA2231: Overload operator equals on overriding ValueType.Equals](ca2231.md)
## See also

Просмотреть файл

@ -24,7 +24,7 @@ dev_langs:
## Overview
This rule flags unnecessary [discard patterns](../../../../_csharplang/proposals/csharp-8.0/patterns.md#discard-pattern), when this discard pattern is used in a context where it has no effect.
This rule flags unnecessary [discard patterns](~/_csharplang/proposals/csharp-8.0/patterns.md#discard-pattern), when this discard pattern is used in a context where it has no effect.
This rule has no associated code style option.

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.4 MiB

После

Ширина:  |  Высота:  |  Размер: 1.4 MiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 232 KiB

После

Ширина:  |  Высота:  |  Размер: 232 KiB

Просмотреть файл

@ -38,7 +38,7 @@ Object detection is a computer vision problem. While closely related to image cl
Use object detection when images contain multiple objects of different types.
![Screenshots showing Image Classification versus Object Classification.](./media/object-detection-onnx/img-classification-obj-detection.PNG)
![Screenshots showing Image Classification versus Object Classification.](./media/object-detection-onnx/img-classification-obj-detection.png)
Some use cases for object detection include:

Просмотреть файл

@ -39,11 +39,11 @@ Starting with Visual Basic 15.3, Visual Basic can infer the names of tuple eleme
The following example creates a `stateInfo` tuple that contains three explicitly named elements, `state`, `stateName`, and `capital`. Note that, in naming the elements, the tuple initialization statement simply assigns the named elements the values of the identically named variables.
[!code-vb[ExplicitlyNamed](../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/program.vb#1)]
[!code-vb[ExplicitlyNamed](../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/Program.vb#1)]
Because elements and variables have the same name, the Visual Basic compiler can infer the names of the fields, as the following example shows.
[!code-vb[ExplicitlyNamed](../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/program.vb#2)]
[!code-vb[ExplicitlyNamed](../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/Program.vb#2)]
To enable inferred tuple element names, you must define the version of the Visual Basic compiler to use in your Visual Basic project (\*.vbproj) file:

Просмотреть файл

@ -14,7 +14,7 @@ The Visual Basic Language Specification is the authoritative source for answers
The specification is available on the [Microsoft Download Center](https://go.microsoft.com/fwlink/?LinkId=188623).
This site contains the [Visual Basic 11 specification](../../../../_vblang/spec/introduction.md). It's built from the Markdown files contained in [the dotnet/vblang GitHub repository](https://github.com/dotnet/vblang/blob/main/spec/README.md).
This site contains the [Visual Basic 11 specification](~/_vblang/spec/introduction.md). It's built from the Markdown files contained in [the dotnet/vblang GitHub repository](https://github.com/dotnet/vblang/blob/main/spec/README.md).
Issues on the specification should be created in the [dotnet/vblang](https://github.com/dotnet/vblang/issues) repository. Or, if you're interested
in fixing any errors you find, you can submit a [Pull request](https://github.com/dotnet/vblang/pulls) to the same repository.
@ -24,4 +24,4 @@ in fixing any errors you find, you can submit a [Pull request](https://github.co
- [Visual Basic Language Reference](../../language-reference/index.md)
>[!div class="step-by-step"]
>[Next](../../../../_vblang/spec/introduction.md)
>[Next](~/_vblang/spec/introduction.md)

Просмотреть файл

@ -149,7 +149,7 @@ To use the underscore character as a leading separator, you must add the followi
When you assign the value of tuple elements from variables, Visual Basic infers the name of tuple elements from the corresponding variable names; you do not have to explicitly name a tuple element. The following example uses inference to create a tuple with three named elements, `state`, `stateName`, and `capital`.
[!code-vb[Inferred tuple names](../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/program.vb#2)]
[!code-vb[Inferred tuple names](../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/named-tuples/Program.vb#2)]
**Additional compiler switches**

Просмотреть файл

@ -0,0 +1,7 @@
{
"excludeStartingWith": [
"xref:",
"~/",
"/",
]
}