Skip to content

Enable friendly overload generation for optional ref, out and in parameters #137

Description

@AArnott

We should use ref or out modifiers to avoid pointers in more places. We don't do it today where the argument is optional, because C# disallows null for ref or out parameters.

However, callers can use Unsafe.NullRef<T>. We could even add this tip to the API docs so folks can discover it.

And the helper function can use Unsafe's SkipInit and IsNullRef methods to detect when this has occurred, if this were ever necessary.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions