System.Runtime.CompilerServices.IsExplicitlyDereferenced Class

Indicates that a managed pointer represents a pointer parameter within a method signature. This class cannot be inherited.

See Also: IsExplicitlyDereferenced Members


public static class IsExplicitlyDereferenced


In C++, managed pointers and managed references are emitted into metadata as pointers. To distinguish between the two types in metadata, the Microsoft C++ compiler applies this modifier to managed pointers. It emits no modifier on managed reference types. Compilers need to know the correct calling syntax when importing a method from metadata scope. The System.Runtime.CompilerServices.IsExplicitlyDereferenced class and its partner, the System.Runtime.CompilerServices.IsImplicitlyDereferenced class, disambiguate reference parameters from pointer parameters.

Compilers emit custom modifiers within metadata to change the way that the just-in-time (JIT) compiler handles values when the default behavior is not appropriate. When the JIT compiler encounters a custom modifier, it handles the value in the way that the modifier specifies. Compilers can apply custom modifiers to methods, parameters, and return values. The JIT compiler must respond to required modifiers but can ignore optional modifiers.

You can emit custom modifiers into metadata using one of the following techniques:


Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions:,
Since: .NET 2.0