Object details
-
I'm sure I know the answer but........ Is there a way to box an item without knowing or having access to the class defined in the type? I mean if I have an object can I see it's data items without boxing it to it's class? I would apreciate confirmation on my belief that this isn't possible or clarification on the issues with doing this. Thanks!
Darroll
-
I'm sure I know the answer but........ Is there a way to box an item without knowing or having access to the class defined in the type? I mean if I have an object can I see it's data items without boxing it to it's class? I would apreciate confirmation on my belief that this isn't possible or clarification on the issues with doing this. Thanks!
Darroll
-
Darrol wrote:
I mean if I have an object can I see it's data items without boxing it to it's class?
"can I see"? What does that mean? You can see it in the Debugger yes? :confused:
led mike
I mean can I access and view or modify the data programmatically from within C#. Ultimately what I'd like is to create objects on the fly and be able to add data to them. I liken it to dynamic web pages where I can add controls to any container. I'd like to use the object, or use my own I guess, to create a fully flexible object.
Darroll
-
I mean can I access and view or modify the data programmatically from within C#. Ultimately what I'd like is to create objects on the fly and be able to add data to them. I liken it to dynamic web pages where I can add controls to any container. I'd like to use the object, or use my own I guess, to create a fully flexible object.
Darroll
I'm not 100% sure what you are trying to achieve. If you are asking, can you dynamically instantiate objects and manipulate them, then yes you can - you're looking to reflection to do this. If, on the other hand, you are asking if you can create new types objects at runtime and then manipulate them (i.e. dynamic typing), then you can do this as well - but you'll need to look at using the CodeDOM - or possibly Reflection.Emit.
Deja View - the feeling that you've seen this post before.
-
I'm not 100% sure what you are trying to achieve. If you are asking, can you dynamically instantiate objects and manipulate them, then yes you can - you're looking to reflection to do this. If, on the other hand, you are asking if you can create new types objects at runtime and then manipulate them (i.e. dynamic typing), then you can do this as well - but you'll need to look at using the CodeDOM - or possibly Reflection.Emit.
Deja View - the feeling that you've seen this post before.
Pete, it is the later of the two examples. Thank you for the direction. I will do some research on dynamic typing. Thanks!
Darroll
-
Pete, it is the later of the two examples. Thank you for the direction. I will do some research on dynamic typing. Thanks!
Darroll
Darrol wrote:
Pete, it is the later of the two examples.
I hope you know what you're doing. Using CodeDom to generate code/compile and execute should probably be limited to a very small group of problem domains for which it is the last resort. In most situations the same problems can be solved with design and techniques like a plug-in mechanism.
led mike