Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

embedding mono with C# "out parameters"

I'm trying to embed a C# class in a C application using libmono, but the documentation is a bit lacking.

I'm trying to call a method with the prototype void MessageToSend(out MessageObject message);

How do i represent the "out parameter"? is it a pointer-to-a-pointer to a MonoObject? Thanks.

PS. as far as libmono is concerned, are 'out' and 'ref' parameters the same?

like image 967
Woodrow Douglass Avatar asked Jul 27 '12 19:07

Woodrow Douglass


1 Answers

You're right, it's MonoObject**.

And out and ref is the same for pretty much everything except the C# compiler.

like image 143
Rolf Bjarne Kvinge Avatar answered Oct 20 '22 20:10

Rolf Bjarne Kvinge