Ross Buggins

Partner at Shore Tech Systems LLP a Norwich based IT consultancy

The fastest way to dynamically create C# objects

by Ross Buggins1. February 2011 18:39
In a current project I am dynamically creating an object of a certain type depending on a value read back from the database. For example, in the data reader results i may have 2 results coming back, the first with a object type value of ‘STS.Person’ and the second with a type of ‘STS.Location’. The result with a object type of ‘Sts.Person’ should have a C#  type created Person() and the result with an object type of ‘Sts.Location’ should create C# type Location().  Person() and Location() both implement the interface ISTSObjects() so ... [More]

Tags: ,

.net | c#

Month List

A little about us