- 
                Notifications
    You must be signed in to change notification settings 
- Fork 549
Closed
Labels
dotnetAn issue or pull request related to .NET (6)An issue or pull request related to .NET (6)enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOSperformanceIf an issue or pull request is related to performanceIf an issue or pull request is related to performance
Milestone
Description
.NET 5/C# 9 has a new UnmanagedCallersOnlyAttribute, which we should start using instead of the MonoPInvokeCallbackAttribute (the main advantage is that the compiler will tell you if you use it wrong, as opposed to the MonoPInvokeCallbackAttribute, where the AOT compiler will crash and not tell you why if you use it wrong).
Ref: dotnet/runtime#47177
Using UnmanagedCallersOnlyAttribute for block callbacks is rather complex, and has been moved to a separate issue: #15783 (see #10470 (comment)).
Metadata
Metadata
Assignees
Labels
dotnetAn issue or pull request related to .NET (6)An issue or pull request related to .NET (6)enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOSperformanceIf an issue or pull request is related to performanceIf an issue or pull request is related to performance