BL said:
is it not posiible by reflection or such other thing ? I don't able to
pass
it in cunstruction due to some reason ?
please help
Are you referring to a struct or a class? A class instance is not actually
created "in" another object, it is created independently in the managed
heap. A struct may either be created "in" a class instance on the heap,
"in" a box or array independently on the heap, in global memory, or on the
stack, or "in" another struct which can be again in any of these locations.
In native C++, and it was directly declared exactly once and inside only one
class, then you could use __offsetof to get to the parent pointer.
In the managed world, if you are talking about a struct on the managed heap
(by embedding inside a class, box, or array), then one ought to be able to
get a handle to the enclosing allocation unit tracked by the garbage
collector (the one which pinning the struct would fix in place).
If you are going to get any help, you need to show some code, because your
grammar and spelling are too poor for us to understand exactly what you
mean.