HttpApplicationState.GetKey(Int32) 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.
Obtient un nom d'objet HttpApplicationState par son index.
public:
System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String
Paramètres
- index
- Int32
Index de l'objet d'état de l'application.
Retours
Nom sous lequel l'objet d'état de l'application a été enregistré.
Exemples
L’exemple suivant retourne les noms de tous les objets de la collection d’états d’application et stocke les noms dans un tableau de chaînes.
int Loop1;
String[] StateVars = new String[Application.Count];
for (Loop1 = 0; Loop1 < Application.Count; Loop1++)
{
StateVars[Loop1] = Application.GetKey(Loop1);
}
Dim Loop1 As Integer
Dim StateVars(Application.Count) As String
For Loop1 = 0 To Application.Count -1
StateVars(Loop1) = Application.GetKey(Loop1)
Next Loop1
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour