Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] add nint IntPtr derivatives among the argument formatters #2903

Closed
mwpowellhtx opened this issue Mar 25, 2024 · 2 comments
Closed

Comments

@mwpowellhtx
Copy link

As in the assert TypeMappings, also documented among Characteristics of the integral types, i.e.

// List of intrinsic types => C# type names
static readonly Dictionary<TypeInfo, string> TypeMappings = new Dictionary<TypeInfo, string>
{
    //...
    { typeof(nint).GetTypeInfo(), "nint" },
    { typeof(nuint).GetTypeInfo(), "nuint" },
    // ...
};

I think nint and nuint are somewhat new integral types, but could not tell you exactly when they were added.

For sake of completeness.

@bradwilson
Copy link
Member

The underlying types themselves are not new (IntPtr and UIntPtr date back to .NET Framework 1.1 in 2003), but the aliases are, and they require C# 9 (released in 2020). It's a compiler feature rather than a runtime feature since they're just type aliases.

@bradwilson
Copy link
Member

Available in v2 2.7.1-pre.12
Available in v3 0.1.1-pre.390

https://xunit.net/docs/using-ci-builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants