D
dragonslayer008
1. Can a value struct inherit from a native struct?
2. Suppose I have a native structure:
struct Vector3
{
float x, y, z;
};
and you make a corresponding managed version
value struct VectorEx3
{
float x, y, z;
};
If you have a function that takes a pointer to a Vector3 as a
parameter, is it okay to cast a VectorEx3 object to it:
VectorEx3 v;
foo( (Vector3*)&v );
I tried it and it worked, but I want to make sure it is defined
behavior.
2. Suppose I have a native structure:
struct Vector3
{
float x, y, z;
};
and you make a corresponding managed version
value struct VectorEx3
{
float x, y, z;
};
If you have a function that takes a pointer to a Vector3 as a
parameter, is it okay to cast a VectorEx3 object to it:
VectorEx3 v;
foo( (Vector3*)&v );
I tried it and it worked, but I want to make sure it is defined
behavior.