Type.MakePointerType Method ()

 

Returns a Type object that represents a pointer to the current type.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

abstract MakePointerType : unit -> Type
override MakePointerType : unit -> Type

Return Value

Type: System.Type

A Type object that represents a pointer to the current type.

Exception Condition
NotSupportedException

The invoked method is not supported in the base class.

TypeLoadException

The current type is TypedReference.

-or-

The current type is a ByRef type. That is, Type.IsByRef returns true.

The MakePointerType method provides a way to generate pointer types for parameter lists.

Using the syntax of Microsoft intermediate language (MSIL), if the current Type object represents Int32, this method returns a Type object representing Int32*.

The following code example creates array, ref (ByRef in Visual Basic), and pointer types for the Test class.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: