-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Description
https://learn.microsoft.com/en-us/dotnet/api/system.type.fullname?view=net-10.0
null if the current instance represents a generic type parameter, an array type, pointer type
using System;
var m = typeof(C).GetMethod("M")!;
foreach (var p in m.GetParameters())
{
Console.WriteLine($"{p.Name}: {p.ParameterType.FullName}");
}
public class C
{
public unsafe void M<T>(int* x, int[] y, T z) { }
}This prints:
x: System.Int32*
y: System.Int32[]
z:
So it doesn't seem to be null for points and array types?
Reproduction Steps
See above.
Expected behavior
Implementation and docs are aligned.
Actual behavior
They are not aligned.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Copilot