I was just browsing through some of my own code in Telerik's JustDecompile and noticed that the following code
switch (data.CurrentSection)
{
case SurveyData.CurrentSectionEnum.Section1:
divSection1.Visible = true;
divSection2.Visible = false;
divSection3.Visible = false;
break;
case SurveyData.CurrentSectionEnum.Section2:
divSection1.Visible = false;
divSection2.Visible = true;
divSection3.Visible = false;
break;
case SurveyData.CurrentSectionEnum.Section3:
divSection1.Visible = false;
divSection2.Visible = false;
divSection3.Visible = true;
break;
}
Was displayed as
switch (data.CurrentSection)
{
case CurrentSectionEnum.Section1:
{
this.divSection1.set_Visible(true);
this.divSection2.set_Visible(false);
this.divSection3.set_Visible(false);
break;
}
case CurrentSectionEnum.Section2:
{
this.divSection1.set_Visible(false);
this.divSection2.set_Visible(true);
this.divSection3.set_Visible(false);
break;
}
case CurrentSectionEnum.Section3:
{
this.divSection1.set_Visible(false);
this.divSection2.set_Visible(false);
this.divSection3.set_Visible(true);
break;
}
}
Was this an artefact of the Telerik Decompiler or could my hunch be correct that no 'set using equals sign' operator exists at some lower level part of the framework? If so could anyone provide more info?
Properties are a construct of the C# (and VB.Net too) language, not the CLR. They are implemented as get_XXX and set_XXX methods.
I would expect the decompiler to recognize them!