You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard/unsafe-code/best-practices.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ but then the pointer is exposed outside of the `fixed` block. This creates a dan
126
126
### Recommendations
127
127
128
128
1. ✔️ DO make sure that pointers in `fixed` blocks do not leave the defined scope.
129
-
2. ✔️ DO prefer safe low-level primitives with built-in escape analysis, such as C#'s [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md). For more information, see [Low Level Struct Improvements](../../csharp/language-reference/proposals/csharp-11.0/low-level-struct-improvements.md).
129
+
2. ✔️ DO prefer safe low-level primitives with built-in escape analysis, such as C#'s [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md). For more information, see [Low-level struct improvements](~/_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md).
130
130
131
131
## 3. Internal implementation details of the runtime and libraries
132
132
@@ -682,7 +682,7 @@ the intended logic.
682
682
683
683
## 15. Fixed-size buffers
684
684
685
-
Fixed-sizebufferswereusefulfor interop scenarios with data sources from other languages or platforms. They then were replaced by safer and more convenient [inline-arrays](../../csharp/language-reference/proposals/csharp-12.0/inline-arrays.md).
685
+
Fixed-sizebufferswereusefulfor interop scenarios with data sources from other languages or platforms. They then were replaced by safer and more convenient [inlinearrays](~/_csharplang/proposals/csharp-12.0/inline-arrays.md).
A modern and a safer alternative is [inline-arrays](../../csharp/language-reference/proposals/csharp-12.0/inline-arrays.md):
699
+
A modern and a safer alternative is [inlinearrays](~/_csharplang/proposals/csharp-12.0/inline-arrays.md):
700
700
701
701
```csharp
702
702
[System.Runtime.CompilerServices.InlineArray(8)]
@@ -964,7 +964,7 @@ Fuzz testing (or "fuzzing") is an automated software testing technique that invo
964
964
## References
965
965
966
966
*[Unsafe code, pointer types, and function pointers](../../csharp/language-reference/unsafe-code.md).
967
-
*[Unsafe code, language specification](../../csharp/language-reference/language-specification/unsafe-code.md).
967
+
*[Unsafe code, language specification](~/_csharpstandard/standard/unsafe-code.md).
968
968
*[What Every CLR Developer Must Know Before Writing Code](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/clr-code-guide.md) for advanced topics around the CoreCLR and the GC internals.
969
969
*[Native interoperability best practices](../../standard/native-interop/best-practices.md).
970
970
*[Managed threading best practices](../../standard/threading/managed-threading-best-practices.md).
0 commit comments