[out] attribute doesn't seem to work on static methods

L

LaserMan

I'm trying to figure out how to specify the equivalent of the C# out
attribute, and apparently [out] is supposed to do the trick, but it only
seems to work with interfaces.

Any ideas on how to make this work?


static void Multiply( [out] Math::Vector3% result, Math::Matrix3% lhs,
Math::Vector3% rhs );

^^^ fails
error C3115: 'out': this attribute is not allowed on 'abstract declarator'

Thanks!!
 
L

LaserMan

LaserMan said:
I'm trying to figure out how to specify the equivalent of the C# out
attribute, and apparently [out] is supposed to do the trick, but it only
seems to work with interfaces.

Any ideas on how to make this work?


static void Multiply( [out] Math::Vector3% result, Math::Matrix3% lhs,
Math::Vector3% rhs );

^^^ fails
error C3115: 'out': this attribute is not allowed on 'abstract
declarator'

Thanks!!

Figured it out. Just needed to use System::Runtime::Interopservices.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top