[Ironruby-core] Calling a C# method with a byref parameter
michaelerasmus at gmail.com
Thu Feb 11 08:44:46 EST 2010
I'm trying to write a IronRuby script that interops with a a .NET assembly
written in C#.
It has a class that derives from a base class in the .NET assembly. One of
the base class protected methods looks like this:
protected void OnNotifyPropertyChanged<T>(string name, ref T localmember, T
I can't for the life of me figure out how to call this method from IR in my
The documentation mentions that you can call *out *parameters without using
them as arguments, but I can't seem to find anything about *ref *params.
If I just try calling the method like this:
OnNotifyPropertyChanged(property_name, value, value)
I get this error:
*Microsoft.Scripting.Core:0:in `Bind': Expression of type
*bleString&' cannot be used for parameter of type
*g' of method 'Void
*ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)'
* from Microsoft.Scripting.Core:0:in `BindCore'*
* from ./dynamic_event_item.rb:22:in `method_missing'*
* from :0*
Am I missing something?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core