Bonjour, je m' explique j'ai cette méthode :
variableDestination est une variable de type string public de ma classe, mais elle peut-être différente (UserId, UserMail, etc..)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 public void LoadData(string variableDestination, string child, string key) { reference.Child(child).Child(key).GetValueAsync().ContinueWith(task => { if (task.IsCompleted) { DataSnapshot snapshot = task.Result; variableDestination = snapshot.Child(key).Value.ToString()); } }); }
Est-il possible de demander une variable en argument de la méthode pour ensuite la redéfinir ?





Répondre avec citation






Partager