tags:

views:

88

answers:

1

im having a bit of problems using any decent C# interface with my F# types so given i have the following C# interface in one project...

//C#
namespace FunctionalInterfacing  
{  
    public interface IFoo  
    {  
        string Bar(string a, string b);  
    }  
}  

and now i want to write a type in F# that implemented that..

#light
module FunctionalInterfacing.Concrete
open FunctionalInterfacing

type public ConcreteType = 
    interface IFoo with
        member this.Bar a b = a

which doesn't seem to work, im getting the following error...

This override takes a different number of arguments to the corresponding abstract member

any ideas?

+5  A: 

Your override shouldn't be in curried form (where the arguments are separated by spaces). Try

member this.Bar(a,b) = a

instead.

kvb