While ProgramFOX's answer is correct, it is precisely this sort of problem where it would be recommended to stick with an if/else statement. It will make the code easier to read and understand what you are doing, both for yourself when you come back to it later, as well as another developer if they have to take the work on.
Furthermore, whether you take that advice or not, you really would be better off having your condition in the positive form (since you are doing something in both cases) because "if this, do x, otherwise do y" is always easier logic to follow than "if not this, do x, otherwise do y".
I.e.
(m_iPage == 7) ? (StartLight = 1, EndLight = 4) : (StartLight = m_iPage, EndLight = m_iPage);
But I repeat, you really should look to change this, if possible, to:
if (m_iPage == 7)
{
StartLight = 1;
EndLight = 4;
}
else
{
StartLight = m_iPage;
EndLight = m_iPage;
}
Regards,
Ian.