Beau Peep Notice Board > Outpourings

Chelsea Flower Show

<< < (2/5) > >>

Tarquin Thunderthighs lll:
None of mine hatched. Sorry!

Roger Kettle:
Superb cartoon, Tarks!

Mince:
This piece of programming that I wrote looks somewhat like a flower show.

return assemblies
   .SelectMany(
      x => x
      .GetTypes()
      .Where(t => t.Namespace != null && t.Namespace.Contains(".LCQ") && t.Name.StartsWith("LCQ"))
      .SelectMany(
         u => Enumerable
            .Range(0, (int)u.GetProperty("Count").GetValue(null))
            .Select(
               v => (
                        Title: (string)u.GetMethod("Title").Invoke(null, new object[] { v }),
                        QNo: v,
                        QType: u
                     )
            )
         .ToList()
      )
   )
   .ToDictionary(
      t => t.Title,
      t => (t.QType, t.QNo)
   );

I'm just gonna wait now for a "Great programming, Mince" from Roger.

Roger Kettle:
Actually, it's pretty average.

Mince:
Is it because I used reflection to invoke the function in the classes? Should I have kept everything strongly typed? Have you managed to open the lid yet?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version