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
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dotnet run -h|--help

## Description

The `dotnet run` command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the [`dotnet build`](dotnet-build.md) command to build the code. Any requirements for the build, such as that the project must be restored first, apply to `dotnet run` as well.
The `dotnet run` command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the [`dotnet build`](dotnet-build.md) command to build the code. Any requirements for the build apply to `dotnet run` as well.

> [!NOTE]
> `dotnet run` doesn't respect arguments like `/property:property=value`, which are respected by `dotnet build`.
Expand Down
29 changes: 10 additions & 19 deletions docs/csharp/language-reference/keywords/ref.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,41 @@
---
description: "ref keyword - C# Reference"
title: "ref keyword"
description: "Understand the different uses for the `ref` keyword and get more information on those uses"
title: "The multiple uses of the `ref` keyword"
ms.date: 09/23/2023
f1_keywords:
- "ref_CSharpKeyword"
helpviewer_keywords:
- "parameters [C#], ref"
- "ref keyword [C#]"
---
# ref (C# reference)
# The `ref` keyword

You use the `ref` keyword in the following contexts:

- In a method signature and in a method call, to pass an argument to a method [by reference](./method-parameters.md#ref-parameter-modifier).

:::code language="csharp" source="./snippets/PassParameters.cs" id="PassByValueOrReference":::
:::code language="csharp" source="./snippets/refKeyword.cs" id="PassByReference":::

- In a method signature, to return a value to the caller by reference. For more information, see [`ref return`](../statements/jump-statements.md#ref-returns).

:::code language="csharp" source="../statements/snippets/jump-statements/ReturnStatement.cs" id="RefReturn":::
:::code language="csharp" source="./snippets/refKeyword.cs" id="ReturnByReference":::

- In a declaration of a local variable, to declare a [reference variable](../statements/declarations.md#reference-variables).

```csharp
ref int aliasOfvariable = ref variable;
```
:::code language="csharp" source="./snippets/refKeyword.cs" id="LocalRef":::

- As the part of a [conditional ref expression](../operators/conditional-operator.md#conditional-ref-expression) or a [ref assignment operator](../operators/assignment-operator.md#ref-assignment).

:::code language="csharp" source="../operators/snippets/shared/AssignmentOperator.cs" id="SnippetRefAssignment":::
:::code language="csharp" source="./snippets/refKeyword.cs" id="ConditionalRef":::

- In a `struct` declaration, to declare a `ref struct`. For more information, see the [`ref` structure types](../builtin-types/ref-struct.md) article.

:::code language="csharp" source="../builtin-types/snippets/shared/StructType.cs" id="SnippetRefStruct":::
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefStruct":::

- In a `ref struct` definition, to declare a `ref` field. For more information, see the [`ref` fields](../builtin-types/ref-struct.md#ref-fields) section of the [`ref` structure types](../builtin-types/ref-struct.md) article.

:::code language="csharp" source="../builtin-types/snippets/shared/StructType.cs" id="SnippetRefField":::
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefField":::

- In a generic type declaration to specify that a type parameter [`allows ref struct`](../../programming-guide/generics/constraints-on-type-parameters.md#allows-ref-struct) types.

```csharp
class SomeClass<T, S>
where T : allows ref struct
where S : T
{
// etc
}
```
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefGeneric":::
62 changes: 62 additions & 0 deletions docs/csharp/language-reference/keywords/snippets/refkeyword.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
public class RefKeywordExamples
{
// <PassByReference>
public void M(ref int refParameter)
{
refParameter += 42;
}
// </PassByReference>

// <ReturnByReference>
public ref int RefMax(ref int left, ref int right)
{
if (left > right)
{
return ref left;
}
else
{
return ref right;
}
}
// </ReturnByReference>

// <LocalRef>
public void M2(int variable)
{
ref int aliasOfvariable = ref variable;
}
// </LocalRef>

// <ConditionalRef>
public ref int RefMaxConditions(ref int left, ref int right)
{
ref int returnValue = ref left > right ? ref left : ref right;
return ref returnValue;
}
// </ConditionalRef>
}

// <SnippetRefStruct>
public ref struct CustomRef
{
public ReadOnlySpan<int> Inputs;
public ReadOnlySpan<int> Outputs;
}
// </SnippetRefStruct>

// <SnippetRefField>
public ref struct RefFieldExample
{
private ref int number;
}
// </SnippetRefField>

// <SnippetRefGeneric>
class RefStructGeneric<T, S>
where T : allows ref struct
where S : T
{
// etc
}
// </SnippetRefGeneric>
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
title: January 2024 security and quality rollup
description: Learn about the improvements in the .NET Framework January 2024 security and quality rollup.
ms.date: 01/08/2024
---
# January 2024 security and quality rollup

_Released January 8, 2024_

## Summary of what's new in this release

- [Security improvements](#security-improvements)
- [Quality and reliability improvements](#quality-and-reliability-improvements)

### Security improvements

#### CVE-2023-36042 – Denial of service vulnerability

This security update addresses a remote code execution vulnerability detailed in [CVE 2023-36042](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36042).

#### CVE-2024-0056 – Security feature bypass vulnerability

This security update addresses a security feature bypass vulnerability detailed in [CVE 2024-0056](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0056).

#### CVE-2024-0057 – Security feature vulnerability

This security update addresses a security feature vulnerability detailed in [CVE 2024-0057](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0057).

#### CVE-2024-21312 – Denial of service vulnerability

This security update addresses a denial of service vulnerability detailed in [CVE 2024-21312](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-21312).

#### Remote code execution vulnerability

This security update addresses a remote code execution vulnerability to HTTP .NET remoting server channel chain.

### Quality and reliability improvements

There are no new Quality and Reliability Improvements in this update.

## Known issues

This release contains no known issues.

## Summary tables

The following table outlines the updates in this release.

| Product version | Cumulative update |
| --- | --- |
| **Microsoft server operating system, version 23H2** | |
| .NET Framework 3.5, 4.8.1 | [5033917](https://support.microsoft.com/kb/5033917) |
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
| .NET Framework 3.5, 4.8.1 | [5033920](https://support.microsoft.com/kb/5033920) |
| **Windows 11, version 21H2** | **[5034276](https://support.microsoft.com/kb/5034276)** |
| .NET Framework 3.5, 4.8 | [5033912](https://support.microsoft.com/kb/5033912) |
| .NET Framework 3.5, 4.8.1 | [5033919](https://support.microsoft.com/kb/5033919) |
| **Microsoft server operating system, version 22H2** | **[5034272](https://support.microsoft.com/kb/5034272)** |
| .NET Framework 3.5, 4.8 | [5033914](https://support.microsoft.com/kb/5033914) |
| .NET Framework 3.5, 4.8.1 | [5033922](https://support.microsoft.com/kb/5033922) |
| **Microsoft server operating system, version 21H2** | **[5034272](https://support.microsoft.com/kb/5034272)** |
| .NET Framework 3.5, 4.8 | [5033914](https://support.microsoft.com/kb/5033914) |
| .NET Framework 3.5, 4.8.1 | [5033922](https://support.microsoft.com/kb/5033922) |
| **Windows 10, version 22H2** | **[5034275](https://support.microsoft.com/kb/5034275)** |
| .NET Framework 3.5, 4.8 | [5033909](https://support.microsoft.com/kb/5036608) |
| .NET Framework 3.5, 4.8.1 | [5033918](https://support.microsoft.com/kb/5033918) |
| **Windows 10, version 21H2** | **[5037035](https://support.microsoft.com/kb/5037035)** |
| .NET Framework 3.5, 4.8 | [5033909](https://support.microsoft.com/kb/5036608) |
| .NET Framework 3.5, 4.8.1 | [5033918](https://support.microsoft.com/kb/5033918) |
| **Windows 10 1809 and Windows Server 2019** | **[5034273](https://support.microsoft.com/kb/5034273)** |
| .NET Framework 3.5, 4.7.2 | [5033904](https://support.microsoft.com/kb/5033904) |
| .NET Framework 3.5, 4.8 | [5033911](https://support.microsoft.com/kb/5033911) |
| **Windows 10 1607 and Windows Server 2016** | |
| .NET Framework 3.5, 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034119](https://support.microsoft.com/kb/5034119) |
| .NET Framework 4.8 | [5033910](https://support.microsoft.com/kb/5033910) |
| **Windows 10 1507** | |
| .NET Framework 3.5, 4.6, 4.6.2 | [5034134](https://support.microsoft.com/kb/5034134) |

The following table is for earlier Windows and Windows Server versions for Security and Quality Rollup updates.  

| Product version | Security and quality rollup |
| --- | --- |
| **Windows Server 2012 R2** | **[5034279](https://support.microsoft.com/kb/5034279)** |
| .NET Framework 3.5 | [5033900](https://support.microsoft.com/kb/5033900) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033906](https://support.microsoft.com/kb/5033906) |
| .NET Framework 4.8 | [5033915](https://support.microsoft.com/kb/5033915) |
| **Windows Server 2012** | **[5034278](https://support.microsoft.com/kb/5034278)** |
| .NET Framework 3.5 | [5033897](https://support.microsoft.com/kb/5033897) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033905](https://support.microsoft.com/kb/5033905) |
| .NET Framework 4.8 | [5033913](https://support.microsoft.com/kb/5033913) |
| **Windows Server 2008 R2** | **[5034277](https://support.microsoft.com/kb/5033977)** |
| .NET Framework 3.5.1 | [5033899](https://support.microsoft.com/kb/5033899) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033907](https://support.microsoft.com/kb/5033907) |
| .NET Framework 4.8 |[5033916](https://support.microsoft.com/kb/5033916) |
| **Windows Server 2008** | **[5034280](https://support.microsoft.com/kb/5034280)** |
| .NET Framework 2.0, 3.0 | [5033898](https://support.microsoft.com/kb/5033898) |
| .NET Framework 3.5 SP1 | [5034008](https://support.microsoft.com/kb/5034008) |
| .NET Framework 4.6.2 | [5033907](https://support.microsoft.com/kb/5033907) |

The following table is for earlier Windows and Windows Server versions for Security Only updates, which aren't cumulative.

| Product version | Security only update |
| --- | --- |
| **Windows Server 2008 R2** | **[5034269](https://support.microsoft.com/kb/5034269)** |
| .NET Framework 3.5.1 | [5033946](https://support.microsoft.com/kb/5033946) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033947](https://support.microsoft.com/kb/5033947) |
| .NET Framework 4.8 |[5033948](https://support.microsoft.com/kb/5033948) |
| **Windows Server 2008** | **[5034270](https://support.microsoft.com/kb/5034270)** |
| .NET Framework 2.0, 3.0 | [5033945](https://support.microsoft.com/kb/5033945) |
| .NET Framework 3.5 SP1 | [5033952](https://support.microsoft.com/kb/5033952) |
| .NET Framework 4.6.2 | [5033947](https://support.microsoft.com/kb/5033947) |

The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the preceding table.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: January 2024 cumulative update preview
description: Learn about the improvements in the .NET Framework January 2024 cumulative update preview.
ms.date: 01/23/2024
---
# January 2024 cumulative update preview

_Released January 23, 2024_

## Summary of what's new in this release

- [Security improvements](#security-improvements)
- [Quality and reliability improvements](#quality-and-reliability-improvements)

### Security improvements

There are no new security improvements in this release. This update is cumulative and contains all previously released security improvements.

### Quality and reliability improvements

This release contains the following quality and reliability improvements.

#### ASP.NET

Addresses an issue with "System.ArgumentException: Illegal characters in path" in some ASP.NET MVC requests. (*Applies to: .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1.*)

#### .NET libraries

Addresses an issue where version of the OSS zlib library is out of date. (*Applies to: .NET Framework 4.8, 4.8.1.*)

## Known issues

This release contains no known issues.

## Summary tables

The following table outlines the updates in this release.

| Product version | Cumulative update preview |
| --- | --- |
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
| .NET Framework 3.5, 4.8.1 | [5034467](https://support.microsoft.com/kb/5034467) |
| **Windows 10, version 22H2** | **[5034582](https://support.microsoft.com/kb/5034582)** |
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |

The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the table above.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: February 2024 security and quality rollup
description: Learn about the improvements in the .NET Framework February 2024 security and quality rollup.
ms.date: 02/14/2024
---
# February 2024 security and quality rollup

_Released February 14, 2024_

## Summary of what's new in this release

- [Security improvements](#security-improvements)
- [Quality and reliability improvements](#quality-and-reliability-improvements)

### Security improvements

There are no new security improvements in this release. This update is cumulative and contains all previously released security improvements.

### Quality and reliability improvements

This release contains the following quality and reliability improvements.

#### ASP.NET

Addresses an issue with “System.ArgumentException: Illegal characters in path” in some ASP.NET MVC requests. (*Applies to: .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1.*)

#### .NET libraries

Addresses an issue where version of the OSS zlib library is out of date. (*Applies to: .NET Framework 4.8, 4.8.1.*)

## Known issues

This release contains no known issues.

## Summary tables

The following table outlines the updates in this release.

| Product version | Cumulative update |
| --- | --- |
| **Microsoft server operating system, version 23H2** | |
| .NET Framework 3.5, 4.8.1 | [5034626](https://support.microsoft.com/kb/5034626) |
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
| .NET Framework 3.5, 4.8.1 | [5034467](https://support.microsoft.com/kb/5034467) |
| **Windows 11, version 21H2** | **[5034686](https://support.microsoft.com/kb/5034686)** |
| .NET Framework 3.5, 4.8 | [5034625](https://support.microsoft.com/kb/5034625) |
| .NET Framework 3.5, 4.8.1 | [5034612](https://support.microsoft.com/kb/5034612) |
| **Microsoft server operating system, version 22H2** | **[5034923](https://support.microsoft.com/kb/5034923)** |
| .NET Framework 3.5, 4.8 | [5034613](https://support.microsoft.com/kb/5034613) |
| .NET Framework 3.5, 4.8.1 | [5034611](https://support.microsoft.com/kb/5034611) |
| **Microsoft server operating system, version 21H2** | **[5034682](https://support.microsoft.com/kb/5034682)** |
| .NET Framework 3.5, 4.8 | [5034613](https://support.microsoft.com/kb/5034613) |
| .NET Framework 3.5, 4.8.1 | [5034611](https://support.microsoft.com/kb/5034611) |
| **Windows 10, version 22H2** | **[5034685](https://support.microsoft.com/kb/5034685)** |
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |
| **Windows 10, version 21H2** | **[5034684](https://support.microsoft.com/kb/5034684)** |
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |
| **Windows 10 1809 and Windows Server 2019** | **[5034683](https://support.microsoft.com/kb/5034683)** |
| .NET Framework 3.5, 4.7.2 | [5034619](https://support.microsoft.com/kb/5034619) |
| .NET Framework 3.5, 4.8 | [5034624](https://support.microsoft.com/kb/5034624) |
| **Windows 10 1607 and Windows Server 2016** | |
| .NET Framework 3.5, 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034767](https://support.microsoft.com/kb/5034767) |
| .NET Framework 4.8 | [5034614](https://support.microsoft.com/kb/5034614) |

The following table is for earlier Windows and Windows Server versions for Security and Quality Rollup updates.  

| Product version | Security and quality rollup |
| --- | --- |
| **Windows Server 2012 R2** | **[5034689](https://support.microsoft.com/kb/5034689)** |
| .NET Framework 3.5 | [5033900](https://support.microsoft.com/kb/5033900) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034622](https://support.microsoft.com/kb/5034622) |
| .NET Framework 4.8 | [5034617](https://support.microsoft.com/kb/5034617) |
| **Windows Server 2012** | **[5034688](https://support.microsoft.com/kb/5034688)** |
| .NET Framework 3.5 | [55033897](https://support.microsoft.com/kb/5033897) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034621](https://support.microsoft.com/kb/5034621) |
| .NET Framework 4.8 | [5034616](https://support.microsoft.com/kb/5034616) |
| **Windows Server 2008 R2** | **[5034687](https://support.microsoft.com/kb/5034687)** |
| .NET Framework 3.5.1 | [5033899](https://support.microsoft.com/kb/5033899) |
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034620](https://support.microsoft.com/kb/5034620) |
| .NET Framework 4.8 |[5034615](https://support.microsoft.com/kb/5034615) |
| **Windows Server 2008** | **[5034690](https://support.microsoft.com/kb/5034690)** |
| .NET Framework 2.0, 3.0 | [5033898](https://support.microsoft.com/kb/5033898) |
| .NET Framework 3.5 SP1 | [5034008](https://support.microsoft.com/kb/5034008) |
| .NET Framework 4.6.2 | [5034620](https://support.microsoft.com/kb/5034620) |

The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the preceding table.
Loading
Loading