I am passing an array of C# objects to a managed C++ DLL. The C# class is defined by:
public class LatLonPointType
{
public double Lat; // Latitude.
public double Lon; // Longitude.
}
I pass an array of LatLonPointTypes to a function in a managed C++ DLL. By trial and error I found that I can pass this to the C++ function using a function argument declared as:
array <LatLonPointType^> ^PolygonPoints
The following C++ code will extract an element of type LatLonPointType ^.
LatLonPointType ^a = PolygonPoints[0];
My questions are:
I have used C++ a number of years ago, this seems to be similar to the reference declaration &. Is there a good reference to ^?
In the above example, how would I convert a (LatLonPointType ^) to a (LatLonPointType) value?
To clarify:
If I have:
LatLonPointType ^a = PolygonPoints[i];
How would I get a.Lat and a.Lon?
Would I use a->Lat and a->Lon?