This has to already exist, but I just can't find it, or don't understand what I am looking at.
Simplely put I want to do this. I want to have an object that I can use that would be generic, but dynamic at the same time.
The code snippet shows something like what I want to do. I want to create an object, tell it why datatypes I am going to use along with the names of the properties I want, and then be able to fill out the object with the values I want. So I can pass it along through the application.
So how would I create this generic DTO?
GenDTO bob = new GenDTO();bob.add(datetime "StartDate");bob.add(string "Name");bob.StartDate = '1/1/2010';bob.Name = 'Smith';GenDTO g123 = new GenDTO();g123.add(int "ID");g123.add(bool "Terminated");g123.ID = 2;g123.Terminated = true;