Archive

Posts Tagged ‘value types’

Generic Value Object With Yield Return

June 9, 2009 3 comments

Inspired by this and this, here’s my version.

Jan Van Ryswyck is right to use static reflection, and to do that he "registers" the properties in a list. On the other hand, assuming you’d have a lot of these objects building up in the GC, it might prove important to reduce the number of ancillary allocations going on, so it may be better to avoid creating a list of the properties in every single instance.

Read more…

Follow

Get every new post delivered to your Inbox.