mercredi 28 septembre 2016

C# if this else if that syntax

Totally new to C# so bare with me!

I have a question called "Q2" it has 5 options, I am using the code below to mask some of the options depending on the "Culture". The first part of the code works but the "else" part doesn't.

if(this.Culture == "hu-HU"| this.Culture == "tr-TR")
{
    Hide(Q2,3);
}
else if (this.Culture == "gb-GB")
{
    Hide(Q2,3,4,5);
}

in plain English it should test if culture is x or y then hide (q2, 3), if culture is that then hide (q2, 3, 4, 5)

Aucun commentaire:

Enregistrer un commentaire