We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2029609 commit d2cb2d1Copy full SHA for d2cb2d1
docs/standard/native-interop/best-practices.md
@@ -400,6 +400,8 @@ Pointers to structs in definitions must either be passed by `ref` or use `unsafe
400
401
✔️ DO use the C# `sizeof()` instead of `Marshal.SizeOf<MyStruct>()` for blittable structures to improve performance.
402
403
+❌ DON'T depend on internal representation of struct types exposed by .NET runtime libraries unless it is explicitly documented.
404
+
405
❌ AVOID using classes to express complex native types through inheritance.
406
407
❌ AVOID using `System.Delegate` or `System.MulticastDelegate` fields to represent function pointer fields in structures.
0 commit comments