Share via


SPFieldCollection.GetField - Méthode

Renvoie le nom de champ à l'interne, affichage ou statique à partir de la collection.

Espace de noms :  Microsoft.SharePoint
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Function GetField ( _
    strName As String _
) As SPField
'Utilisation
Dim instance As SPFieldCollection
Dim strName As String
Dim returnValue As SPField

returnValue = instance.GetField(strName)
public SPField GetField(
    string strName
)

Paramètres

  • strName
    Type : System.String

    Une chaîne spécifiant soit interne, affichage ou nom statique de ce champ.

Valeur renvoyée

Type : Microsoft.SharePoint.SPField
Objet SPField qui représente le champ.

Exceptions

Exception Condition
ArgumentException

Le champ est introuvable.

Remarques

Microsoft SharePoint Foundation recherche tout d'abord par nom interne ; puis, le cas échéant, par le nom complet ; Enfin, le cas échéant, par un nom statique.

Voir aussi

Référence

SPFieldCollection classe

SPFieldCollection - Membres

Microsoft.SharePoint - Espace de noms