Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-12 Thread Shri Borde
, 2010 9:06 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter Generic type inference should work like it does in C#. I’ll get some more tests in there and get Jimmy to update the docs. JD From: ironruby-core-boun...@rubyforge.org

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-12 Thread Jim Deville
-core@rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter On what types will IR be able to infer the types? Is that documented on the site and I just didn't see it? Ryan Riley On Thu, Feb 11, 2010 at 9:55 AM, Jim Deville mailto:jdevi...@microsoft.com>>

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-12 Thread Michael Erasmus
; *From:* ironruby-core-boun...@rubyforge.org [mailto: >> ironruby-core-boun...@rubyforge.org] *On Behalf Of *Shay Friedman >> *Sent:* Thursday, February 11, 2010 6:53 AM >> *To:* ironruby-core@rubyforge.org >> *Subject:* Re: [Ironruby-core] Calling a C# method with

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Ryan Riley
.org > *Subject:* Re: [Ironruby-core] Calling a C# method with a byref parameter > > > > You should call generic methods a bit differently. > > > > The next code works: > > ret_val = c.method(:do_something_else).of(String).call(str) > > > > Shay. >

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Jim Deville
ruary 11, 2010 6:53 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str)

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Shay Friedman
You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str) Shay. Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog:

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Michael Erasmus
Thanks Shay. OK your code works. But my trouble seems to come in with the Generic method. When I do: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } public string

Re: [Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Shay Friedman
It returns another return value with the new ref value. For example, if you have the next c# class: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } } This is the IronRuby code you can write to use

[Ironruby-core] Calling a C# method with a byref parameter

2010-02-11 Thread Michael Erasmus
Hi Everyone, 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(string name, ref T localmembe