bonjour,
je voudrais récupérer le type d'un string et faire une comparaison,
mais j'ai une erreur
voici mon code:
voici l'erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 //String Mystring = "1234"; string Mystring = "blabla"; Type type = MyString.GetType(); if (type == System.String) { //instructions } if (type == System.Int32) { //instructions }
quelqu'un aurait t-il une idéeString is a type which is not valid in the current context
//int is a type which is not valid in the current context
merci
Partager