I have a class defined as:
public ref class MyParameters
{
private:
property Decimal^ tickValue;
public:
MyParameters(Decimal^ tickValue){
this->tickValue = tickValue;
}
std::string GetTickValue();
};
std::string MyParameters::GetTickValue()
{
String^ test = this->tickValue->ToString(); <--Invalid Cast here
return marshal_as<std::string>(test);
}
If I breakpoint on that line and paste this->tickValue->ToString() into the quick watch it works fine!
I did notice that my Constructor signature was changed to MyParameters(ValueType^ tickValue)??