Marshal.UnsafeAddrOfPinnedArrayElement Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| UnsafeAddrOfPinnedArrayElement(Array, Int32) |
Obsolète.
Obtient l’adresse de l’élément à l’index spécifié à l’intérieur du tableau spécifié. |
| UnsafeAddrOfPinnedArrayElement<T>(T[], Int32) |
Obtient l’adresse de l’élément à l’index spécifié dans un tableau d’un type spécifié. |
UnsafeAddrOfPinnedArrayElement(Array, Int32)
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é à l’intérieur du 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 arr paramètre de l’élément souhaité.
Retours
nativeint
Adresse de l’intérieur indexarr.
- Attributs
Remarques
Le tableau doit être épinglé à l’aide d’une GCHandle version antérieure à cette méthode. Pour des performances maximales, cette méthode ne valide pas le tableau passé à celui-ci ; cela peut entraîner un comportement inattendu.
Voir aussi
S’applique à
UnsafeAddrOfPinnedArrayElement<T>(T[], Int32)
Obtient l’adresse de l’élément à l’index spécifié dans un tableau d’un 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 du tableau.
Paramètres
- arr
- T[]
Tableau qui contient l’élément souhaité.
- index
- Int32
Index de l’élément souhaité dans le arr tableau.
Retours
nativeint
Adresse de index .arr
- Attributs
Remarques
Le tableau doit être épinglé à l’aide d’une GCHandle version antérieure à cette méthode. Pour des performances maximales, cette méthode ne valide pas le tableau passé à celui-ci ; cela peut entraîner un comportement inattendu.