When to use reflection to convert datarow to an object

Posted by Daniel McNulty on Stack Overflow See other posts from Stack Overflow or by Daniel McNulty
Published on 2012-06-15T15:08:22Z Indexed on 2012/06/15 15:16 UTC
Read the original article Hit count: 157

Filed under:
|
|
|
|

I'm in a situation now were I need to convert a datarow I've fetched from a query into a new instance of an object. I can do the obvious looping through columns and 'manually' assign these to properties of the object - or I can look into reflection such as this: http://www.codeproject.com/Articles/11914/Using-Reflection-to-convert-DataRows-to-objects-or

What would I base the decision on? Just scalability??

© Stack Overflow or respective owner

Related posts about c#

Related posts about object