Bad Code Green

4 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 22 Sep 2010 Link to this post

    Consider the following code...
    foreach (XElement e in GetGroups(DataList))
    {
      if (e.Attribute("Name") == PageName || e.Attribute("Name") == "Generic")
      {
        PopulateList(e, ListToPopulate);
      }
    }
    The first part of the if statement should show as an error as you can't  apply the operator "==" to System.Xml.Linq.XAttribute and String.

    Apparently.
    -- 
    Stuart
  2. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 01 Oct 2010 Link to this post

    Hello Stuart Hemming,

    This is a known issue. JC currently doesn't check == operator types extensively.


    All the best,
    Dennis :: Dr. Code
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 01 Oct 2010 Link to this post

    Dear Dr Code,

    Is that the equivalent of you telling me to take two aspirin and call back in the morning?

    -- 
    Stuart
  5. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 01 Oct 2010 Link to this post

    Hi Stuart,

    Basically we'll fix the headache, but have to fix the heart disease first. Seriously, the bad-code-greens go with less priority than other issues (good-code-reds, exceptions, crashes). Just to let you know that your particular issue is on our list.


    Sincerely yours,
    Dennis :: Dr. Code
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top