This is a migrated thread and some comments may be shown as answers.

Code Analysis 'Duplicate Case' Error

3 Answers 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pat
Top achievements
Rank 1
Pat asked on 12 Sep 2012, 02:09 PM
Why are these considered duplicate cases?


      
static void Main(string[] args)
{
    string m = "";
    string result = "";
    switch (m)
    {
        case @"\Z":
            result = "Escaped Z";
            break;
        case @"\Q":
            result = "Escaped Q";
            break;
        default:
            break;
    }
}

3 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 17 Sep 2012, 12:46 PM
Hi,

 Thanks for the feedback.
We successfully reproduced the issue and made an item for it in our system.
We will do our best to fix it as soon as possible.
Meanwhile, I will suggest you to ignore the error until we fix it..
I also added 600 Telerik points to your account as a reward for your efforts.
Thanks.

Kind regards,
Zdravko
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
SHING SHUN
Top achievements
Rank 1
Iron
answered on 20 Oct 2012, 05:03 AM
is the following code duplicate case belong to same error?

public static string EscapeXmlString(IEnumerable<char> rawString)
        {
            StringBuilder stringBuilder = new StringBuilder();
            foreach (char c in rawString)
            {
                switch (c)
                {
                    case '\u0009':
                        stringBuilder.Append("&#x09;");
                        break;
                    case '\u000A':
                        stringBuilder.Append("&#x0A;");
                        break;
                    case '\u000D':
                        stringBuilder.Append("&#x0D;");
                        break;
                    case '&':
                        stringBuilder.Append("&amp;");
                        break;
                    case '\'':
                        stringBuilder.Append("&apos;");
                        break;
                    case '"':
                        stringBuilder.Append("&quot;");
                        break;
                    case '<':
                        stringBuilder.Append("&lt;");
                        break;
                    case '>':
                        stringBuilder.Append("&gt;");
                        break;
                    default:
                        stringBuilder.Append(c);
                        break;
                }
            }
            return stringBuilder.ToString();
        }
0
Zdravko
Telerik team
answered on 24 Oct 2012, 10:13 AM
Hello,

 Thanks for the feedback.
It seems this case is different, because we have fixed the previous one and this is still shown as an error.
I made a PITS item where you can track its progress and also added 600 Telerik points to your account as a reward for your efforts.
I would recommend you to ignore the error until we fix it.
Thanks.

All the best,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
Pat
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
SHING SHUN
Top achievements
Rank 1
Iron
Share this question
or