How to implement a C# interface in F#?

Posted by Anton Andreev on Stack Overflow See other posts from Stack Overflow or by Anton Andreev
Published on 2010-12-29T17:48:12Z Indexed on 2010/12/29 17:54 UTC
Read the original article Hit count: 207

Filed under:
|
|
|

I would like to implement the following C# interface in F#:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Addins;

[TypeExtensionPoint]
public interface ISparqlCommand
{
    string Name { get; }
    object Run(Dictionary<string, string> NamespacesDictionary,    org.openrdf.repository.Repository repository, params object[] argsRest);
}   

This is what I have tried, but it gives me: "Incomplete structured construct at or before this point in expression"

#light

module Module1

open System
open System.Collections.Generic;

type MyClass() =
    interface ISparqlCommand with
        member this.Name = 
            "Finding the path between two tops in the Graph"
        member this.Run(NamespacesDictionary, repository, argsRest) = 
            new System.Object

What am I doing wrong? Maybe indentation is wrong?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET