Reply to thread

thanks Gibman,

use TryGetValue was my first idea, as KeyNotFoundException is known for its expense.


Other question not directly connected ti the topic - what this code[CODE]    if (detail.FreeToAir)

        {

          hasFta = true;

        }

        if (!detail.FreeToAir)

        {

          hasScrambled = true;

        }

      }


      int imageIndex;

      if ([B][COLOR="Red"]hasFta && hasScrambled[/COLOR][/B])

      {

        imageIndex = 5;

      }

      else if (hasScrambled)

      {

        imageIndex = 4;

      }

      else

      {

        imageIndex = 3;

      }

[/CODE] suppose to do? can selected condition ever be true?

are the channels with both FTA and Scrambled flags set exist? we have in DB only one flag FreeToAir.


Top Bottom