'lo
J'ai un conflit entre un accesseur X et une méthode statique X(string). Le compilateur (VS2008) bloque sur l'accesseur en m'indiquant "le type contient déjà une défintion pour X".
Quelqu'un a une explication ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 public class ANNEXE { string ETABL = "01"; public static string BASE_A_UTILISER(string ETABL) { if (ETABL.ToLower() == "02") return "bdd02"; else return "bdd01-a"; } public string BASE_A_UTILISER { get { return BASE_A_UTILISER(this.ETABL); } } // méthode d'instance public string BIDON() { return "instance" + BASE_A_UTILISER ; } // méthode de classe public static string BIDON2() { return "classe" + BASE_A_UTILISER("02") ; } }
Partager