How can we help you today? How can we help you today?
Clive Tong
The types named like "<>f__AnonymousType0" are the anonymous types that the compiler generates for code such as the following int[] items = new int[] { 1, 2, 3, 4 }; var result = items.Select(x => new { A = x }); where it needs to generate a class with a property A for holding the result of the select. If I compile the above code and de-compile using Reflector, with the View/Options/Optimization set to 3.5 I get int[] items = new int[] { 1, 2, 3, 4 }; var result = from x in items select new { A = x }; but if I set it to 1.0, Reflector no longer tries to get rid of the anonymous types and I see var result = new int[] { 1, 2, 3, 4 }.Select((CS$<>9__CachedAnonymousMethodDelegate1 != null) ? CS$<>9__CachedAnonymousMethodDelegate1 : (CS$<>9__CachedAnonymousMethodDelegate1 = new Func<int, <>f__AnonymousType0<int>>(MainWindow.<Test>b__0))); } If you have the optimization level set to 3.5, then it is a bug if Reflector is not getting rid of the anonymous types. Do you have a reproducible example we can have a look at to debug this? In your example, the new { stategroup = stategroup, state = state } is the type the compiler is generating as <>f__AnonymousType0 - this instance is then being passed into the Where and the StoryBoard is being pulled out of the state component and returned. / comments
The types named like "<>f__AnonymousType0" are the anonymous types that the compiler generates for code such as the following int[] items = new int[] { 1, 2, 3, 4 }; var result = items.Select(x => ...
0 votes