Marshal.UnsafeAddrOfPinnedArrayElement Méthode

Définition

Surcharges

UnsafeAddrOfPinnedArrayElement(Array, Int32)
Obsolète.

Obtient l'adresse de l'élément à l'index spécifié dans le tableau spécifié.

UnsafeAddrOfPinnedArrayElement<T>(T[], Int32)

Obtient l'adresse de l'élément à l'index spécifié dans un tableau du type spécifié.

UnsafeAddrOfPinnedArrayElement(Array, Int32)

Source:
Marshal.cs
Source:
Marshal.cs
Source:
Marshal.cs

Attention

UnsafeAddrOfPinnedArrayElement(Array, Int32) may be unavailable in future releases. Instead, use UnsafeAddrOfPinnedArrayElement<T>(T[], Int32). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296517

Obtient l'adresse de l'élément à l'index spécifié dans le tableau spécifié.

public:
 static IntPtr UnsafeAddrOfPinnedArrayElement(Array ^ arr, int index);
[System.Obsolete("UnsafeAddrOfPinnedArrayElement(Array, Int32) may be unavailable in future releases. Instead, use UnsafeAddrOfPinnedArrayElement<T>(T[], Int32). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296517")]
[System.Security.SecurityCritical]
public static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
public static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
[System.Security.SecurityCritical]
public static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
[<System.Obsolete("UnsafeAddrOfPinnedArrayElement(Array, Int32) may be unavailable in future releases. Instead, use UnsafeAddrOfPinnedArrayElement<T>(T[], Int32). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296517")>]
[<System.Security.SecurityCritical>]
static member UnsafeAddrOfPinnedArrayElement : Array * int -> nativeint
static member UnsafeAddrOfPinnedArrayElement : Array * int -> nativeint
[<System.Security.SecurityCritical>]
static member UnsafeAddrOfPinnedArrayElement : Array * int -> nativeint
Public Shared Function UnsafeAddrOfPinnedArrayElement (arr As Array, index As Integer) As IntPtr

Paramètres

arr
Array

Tableau qui contient l'élément souhaité.

index
Int32

Index dans le paramètre arr de l'élément souhaité.

Retours

IntPtr

nativeint

Adresse de index dans arr.

Attributs

Remarques

Le tableau doit être épinglé à l’aide d’un GCHandle avant d’être passé à cette méthode. Pour des performances maximales, cette méthode ne valide pas le tableau qui lui est passé ; cela peut entraîner un comportement inattendu.

Voir aussi

S’applique à

UnsafeAddrOfPinnedArrayElement<T>(T[], Int32)

Source:
Marshal.cs
Source:
Marshal.cs
Source:
Marshal.cs

Obtient l'adresse de l'élément à l'index spécifié dans un tableau du type spécifié.

public:
generic <typename T>
 static IntPtr UnsafeAddrOfPinnedArrayElement(cli::array <T> ^ arr, int index);
[System.Security.SecurityCritical]
public static IntPtr UnsafeAddrOfPinnedArrayElement<T> (T[] arr, int index);
public static IntPtr UnsafeAddrOfPinnedArrayElement<T> (T[] arr, int index);
[<System.Security.SecurityCritical>]
static member UnsafeAddrOfPinnedArrayElement : 'T[] * int -> nativeint
static member UnsafeAddrOfPinnedArrayElement : 'T[] * int -> nativeint
Public Shared Function UnsafeAddrOfPinnedArrayElement(Of T) (arr As T(), index As Integer) As IntPtr

Paramètres de type

T

Type de tableau.

Paramètres

arr
T[]

Tableau qui contient l'élément souhaité.

index
Int32

Index de l'élément souhaité dans le tableau arr.

Retours

IntPtr

nativeint

Adresse de index dans arr.

Attributs

Remarques

Le tableau doit être épinglé à l’aide d’un GCHandle avant d’être passé à cette méthode. Pour des performances maximales, cette méthode ne valide pas le tableau qui lui est passé ; cela peut entraîner un comportement inattendu.

Voir aussi

S’applique à