bool found = false; int valeur = 0; Type type = typeof(Test); FieldInfo[] infos = type.GetFields(BindingFlags.Public|BindingFlags.Static); foreach ( FieldInfo info in infos ) { if ( info.Name == element ) { found = true; valeur = (int)info.GetValue(null); } } if ( found == true ) MessageBox.Show(element + " trouvé, valeur : " + valeur.ToString()); else MessageBox.Show(element + " non trouvé.");