Open antonioaversa opened 11 months ago
Annoyingly, the examples in the documentation for .NET 8.0 explicitly show this attribute being used on generic methods, and methods in generic classes.
It's only when you read further down that you see:
Generic parameters are supported since .NET 9.
Related to C# 12 Zero-overhead member access.
Using
UnsafeAccessorAttribute
on generic methods results in aSystem.BadImageFormatException Invalid usage of UnsafeAccessorAttribute
.Related new rule ideas on C# 12 Zero-overhead member access: