Vector.GetElement Méthode
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.
GetElement(Vector2, Int32) | |
GetElement(Vector3, Int32) | |
GetElement(Vector4, Int32) | |
GetElement<T>(Vector<T>, Int32) |
Obtient l'élément au niveau de l'index spécifié. |
public:
[System::Runtime::CompilerServices::Extension]
static float GetElement(System::Numerics::Vector2 vector, int index);
public static float GetElement(this System.Numerics.Vector2 vector, int index);
static member GetElement : System.Numerics.Vector2 * int -> single
<Extension()>
Public Function GetElement (vector As Vector2, index As Integer) As Single
Paramètres
- vector
- Vector2
- index
- Int32
Retours
S’applique à
.NET 10
Produit | Versions |
---|---|
.NET | 10 |
public:
[System::Runtime::CompilerServices::Extension]
static float GetElement(System::Numerics::Vector3 vector, int index);
public static float GetElement(this System.Numerics.Vector3 vector, int index);
static member GetElement : System.Numerics.Vector3 * int -> single
<Extension()>
Public Function GetElement (vector As Vector3, index As Integer) As Single
Paramètres
- vector
- Vector3
- index
- Int32
Retours
S’applique à
.NET 10
Produit | Versions |
---|---|
.NET | 10 |
public:
[System::Runtime::CompilerServices::Extension]
static float GetElement(System::Numerics::Vector4 vector, int index);
public static float GetElement(this System.Numerics.Vector4 vector, int index);
static member GetElement : System.Numerics.Vector4 * int -> single
<Extension()>
Public Function GetElement (vector As Vector4, index As Integer) As Single
Paramètres
- vector
- Vector4
- index
- Int32
Retours
S’applique à
.NET 10
Produit | Versions |
---|---|
.NET | 10 |
- Source:
- Vector.cs
- Source:
- Vector.cs
Obtient l'élément au niveau de l'index spécifié.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T GetElement(System::Numerics::Vector<T> vector, int index);
public static T GetElement<T>(this System.Numerics.Vector<T> vector, int index);
static member GetElement : System.Numerics.Vector<'T> * int -> 'T
<Extension()>
Public Function GetElement(Of T) (vector As Vector(Of T), index As Integer) As T
Paramètres de type
- T
Type des éléments dans le vecteur.
Paramètres
- vector
- Vector<T>
Vecteur à partir duquel obtenir l’élément.
- index
- Int32
Index de l’élément à obtenir.
Retours
Valeur de l’élément à la position index
.
Exceptions
index
est inférieur à zéro ou supérieur au nombre d’éléments.
Le type de vector
(T
) n’est pas pris en charge.
S’applique à
.NET 10 et autres versions
Produit | Versions |
---|---|
.NET | 8, 9, 10 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :