Pour etre définitivement plus clair :
Code C# :
Codes MSIL :Code:
1
2
3
4
5
6 public ProgramWorkProduct RawRatios { get { return rawRatios; } set { rawRatios = value; } }
Signature d'une méthode "normale" :Code:
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
29
30
31
32
33
34
35 //property .property instance class Program.ProgramWorkProduct RawRatios() { //appel au getter .get instance class Program.ProgramWorkProduct Program.frmMainProgram::get_RawRatios() //appel au setter .set instance void Program.frmMainProgram::set_RawRatios(class Program.ProgramWorkProduct) } // end of property frmMainProgram::RawRatios //setter .method public hidebysig specialname instance void set_RawRatios(class Program.ProgramWorkProduct 'value') cil managed { // Code size 8 (0x8) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class Program.ProgramWorkProduct Program.frmMainProgram::rawRatios IL_0007: ret } // end of method frmMainProgram::set_RawRatios //getter .method public hidebysig specialname instance class Program.ProgramWorkProduct get_RawRatios() cil managed { // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class Program.ProgramWorkProduct Program.frmMainProgram::rawRatios IL_0006: ret } // end of method frmMainProgram::get_RawRatios
On voit donc bien qu'il y a 2 nouvelles fonctions qui apparaissent, meme si la propriétée ne disparait pas...Code:.method private hidebysig instance void tuneGUIStatus() cil managed