Skip to content

Commit ee36d6a

Browse files
CopilotBillWagnerjkotas
authored
Benefits of unsafe code are ambiguously stated (#47073)
* Initial plan * Clarify that unsafe code enables performance optimizations rather than providing them automatically Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Fix wording to address review feedback - focus on direct memory access capabilities rather than algorithms Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
1 parent 4ca62c6 commit ee36d6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/language-reference/unsafe-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ C# supports an [`unsafe`](keywords/unsafe.md) context, in which you can write *u
2222
Unsafe code has the following properties:
2323

2424
- Methods, types, and code blocks can be defined as unsafe.
25-
- In some cases, unsafe code can increase an application's performance by removing array bounds checks.
25+
- In some cases, unsafe code can increase an application's performance by enabling direct memory access through pointers to avoid array bounds checks.
2626
- Unsafe code is required when you call native functions that require pointers.
2727
- Using unsafe code introduces security and stability risks.
2828
- The code that contains unsafe blocks must be compiled with the [**AllowUnsafeBlocks**](compiler-options/language.md#allowunsafeblocks) compiler option.

0 commit comments

Comments
 (0)