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

Decompilation error

1 Answer 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jesper Krejberg Petersen
Top achievements
Rank 2
Jesper Krejberg Petersen asked on 23 Oct 2011, 06:55 PM
I have a method like this:

 

public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
{
    switch (resourceType)
    {
        case "Barn":
            return this.GetChildren();
 
        case "Hjem":
            return this.GetHomes();
 
        case "Kontakt":
            return this.GetContacts();
 
        case "Privat":
            return this.GetVisibility();
 
        default:
            throw new InvalidOperationException("Unknown resource type: " + resourceType);
    }
}

In JustDecompile 2011.2.1017.4 this becomes:

public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
{
    string str = resourceType;
    if (str != null)
    {
        if ((str == "Barn" || str != "Hjem") && str == "Kontakt" || str != "Privat")
        {
            return this.GetChildren();
            return this.GetHomes();
            return this.GetContacts();
        }
        return this.GetVisibility();
    }
    throw new InvalidOperationException(string.Concat("Unknown resource type: ", resourceType));
}


Cheers /Jesper

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay G Rusev
Telerik team
answered on 27 Oct 2011, 09:12 AM
Hello Jasper,

 Thank you for the feedback. We are aware of this problem and we are working on it, so it will definitely be fixed in a future release. Please, stay tuned and update regularly.

Greetings,
Nikolay G Rusev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
Jesper Krejberg Petersen
Top achievements
Rank 2
Answers by
Nikolay G Rusev
Telerik team
Share this question
or