S
soren.enemaerke
Hi everybody.
I'm writing a .NET wrapper class for a native C++ library and decided
to do it in C++/CLI. One of the problems I ran in to is the following.
In C++ I have the following
public ref class MyClass
{
....
bool DoIt(DateTime^% date);
bool DoIt2([OutAttribute] DateTime^% date)
}
which I think should translate into a method calls with c# syntax:
bool DoIt(ref DateTime date);
bool DoIt2(out DateTime date);
So I was a bit puzzled when the following showed up:
bool DoIt(ref ValueType date);
Where is my type safety? What am I doing wrong? Am I trying to do
something (returning value types from c++/cli via ref and out) that is
just not possible?
bool DoIt(ref ValueType date);
I'm writing a .NET wrapper class for a native C++ library and decided
to do it in C++/CLI. One of the problems I ran in to is the following.
In C++ I have the following
public ref class MyClass
{
....
bool DoIt(DateTime^% date);
bool DoIt2([OutAttribute] DateTime^% date)
}
which I think should translate into a method calls with c# syntax:
bool DoIt(ref DateTime date);
bool DoIt2(out DateTime date);
So I was a bit puzzled when the following showed up:
bool DoIt(ref ValueType date);
Where is my type safety? What am I doing wrong? Am I trying to do
something (returning value types from c++/cli via ref and out) that is
just not possible?
bool DoIt(ref ValueType date);