Decompile Just Wrong ?

2 posts, 0 answers
  1. Adam Taub
    Adam Taub avatar
    1 posts
    Member since:
    Dec 2009

    Posted 28 Jul 2011 Link to this post

    The following code:
    static void Main(string[] args)
    {
    var sampleData = new List<SampleObject> {new SampleObject {Name = "Adam", Age = 44}};
    var d = new Dictionary<string, int>();
    foreach(var i in sampleData)
    d[i.Name] = i.Age;
    }

    Decompiles into:
    private static void Main(string[] args)
    {
     List<SampleObject> sampleObjects = new List<SampleObject>();
     SampleObject sampleObject.Age = 44.Add(sampleObject);
     List<SampleObject> sampleData = sampleObjects;
     Dictionary<string, int> d = new Dictionary<string, int>();
     foreach (SampleObject i in sampleData)
     {
      d.Item = i.Name;
     }
    }

  2. Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 29 Jul 2011 Link to this post

    Hello Adam Taub,

     Thank you for the report. We have successfully reproduced this bug over here. We'll definitely fix that in some of  the versions to follow, so, please, stay tuned for updates.

    All the best,

    Yordan Dikov
    the Telerik team

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

  3. DevCraft banner
Back to Top